Items tagged with output output Tagged Items Feed

Say I have a funtion something like this

f:=x^2;

f1:=diff(f,x);

Now I want the above output to be saved to a .txt file having maple friendly format.

 

To begin with my code is:

with(Statistics);

N:=RandomVariable(Normal(5,2))

 

for i from 1 by 1 to 100 do

OS[i]:=Sample(N,50)

end do

 

for i from 1 by 1 to 100 do

 print(i)

  from j from 1 by 1 to 1000 do

    BS[i,j]:=Bootstrap('Mean',OS[i],replications=1)

  end do

end do

 

My goal is to produce as an output in the software's screen the values of 1000 bootstrap means for each of 100 original samples in order to export the results to Excel. Based on my basic knowledge of programming I thought that I can do that through the use of the vectors. Unfortunately though when I trigger the operation the software seems to be evaluating (with the homonymous indication in the bottom left corner of the screen) it for an indefinite period of time, obliging me to stop it at some point. However, let me point out that when I do the same process for i and j 4 and 10 for example then I have results, therefore presumably my code is correct. I know that I can do the same operation in Excel and I have already created a respective macro, however I wanted to use Maple in order to take advantage of its fast operation of calculations, which is pointless in case that I have to wait more time for the results than I have already waited to be eventually produced.

Any thought and idea would be appreciated, thank you very much in advance!

Hi,

  I have the following input

f:=x^2*exp(-1.2*x);
maximize(f, x=0..100,location);

 Maple gives me the location is x=1.25. However, how should I do to obtain this position?  If I write

 

a:=maximize(f, x=0..100,location);

 

  Seems it do not work :(

 

  I may try fsolve at the maximum value, but it seems to be awkward..

 

Thank you very much!

  

Hi! I just started to use Maple and I play with some of its functions. I have seen in examples related to RegularChain package an output like  [regular_chain, [[-1, -1], [0, 0]]] and I wonder how I should read it. Thanks for any help and sorry if my question is very basic.

can anybody help me? i want to check the consistency of my scheme. My equation is too long if i check manually, so i used maple 13 to simplify my equation. But it cannot simplify it because of length of output exceed limit 1000000

restart

eqn1 := u+(1-exp(-m))*u[t]+(1-exp(-m))^2*u[tt]/factorial(2)+(u-(1-exp(-m))*u[t]+(1-exp(-m))^2*u[tt]/factorial(2))-u-(1-exp(-m))*u[x]-(1-exp(-m))^2*u[xx]/factorial(2)-u+(1-exp(-m))*u[x]-(1-exp(-m))^2*u[xx]/factorial(2)+(1-exp(-m))^2*u+(1-exp(-m))^2*u^3-(1-exp(-m))^2*(4*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3))*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)/((((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3+(x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)+(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+(t+1-exp(-m)))-(4*(x+1-exp(-m)))*sinh(x+1-exp(-m)+(t+1-exp(-m)))+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+(t+1-exp(-m)))^3+(x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3));

(1-exp(-m))^2*u[tt]-(1-exp(-m))^2*u[xx]+(1-exp(-m))^2*u+(1-exp(-m))^2*u^3-(1-exp(-m))^2*(4*((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-16*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+4*(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)/((((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3)*((x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3+(x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)+(((x+1-exp(-m))^2-2)*cosh(x+1-exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+1-exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+1-exp(-m)+t)^3)*((x^2-2)*cosh(x+1-exp(-m)+t)-4*x*sinh(x+1-exp(-m)+t)+x^6*cosh(x+1-exp(-m)+t)^3)*(((x+1-exp(-m))^2-2)*cosh(x+2-2*exp(-m)+t)-4*(x+1-exp(-m))*sinh(x+2-2*exp(-m)+t)+(x+1-exp(-m))^6*cosh(x+2-2*exp(-m)+t)^3+(x^2-2)*cosh(x+t)-4*x*sinh(x+t)+x^6*cosh(x+t)^3))

(1)

a := simplify(eqn1);

`[Length of output exceeds limit of 1000000]`

(2)

``


Download consistency_expmle_4.mw

.

Hi
how can we write a same result n-times near each other


x:=3:
for i from 1 to 4 do       # here the 4 can be a variable and can change...
    x;
    od;
                                  3
                                  3
                                  3
                                  3

I need the result to come in that form  :    3  ,  3  ,  3  ,  3
and because the number of times can change i can't just easily write x,x,x,x;

thanks in advance

 when i  input  bellow

                

  • Maple can output

                  

 

 

Has there been any progress with new commands for Maple 13 that allow one to auto-resize the plotting grid?

I am generating fractals with Maple 13 and resizing the plot output grid manually is not an option because it distorts it. Neither is the option to resize it once and recalculate, because the final grid contains many points.

Any pre-processing or massaging code prior to executing the main code is very welcome (if it can be done).

Many thanks,

Yiannis

Here's my problem,

I'm this line of code

result:=solve({x+y=1,x+2y=4},{x,y})
and the value of result is
{x=-2,y=3} and the value of result[1] is x=-2.

I would like the value of result to be {-2,3} for I need to use those output later. Is there any way to put those output in a list?

I tried to run a few calculation on maple, the numerical output is, e.g.

 

0.3 10^(-5)

 

Is there any simple way to set it as 0.3e-5? I am not intened to write the data into a file, hence, i am not sure if writedata is a suitable option.

 

Thank you very much! 

 

Dear friends!

My question does not concern essential functioning of Maple and does not influence on any computation performance. But I ask you to pay attantion to it.

For a long time ago I noticed, that representation of some elements of Maple worksheets does not correspond to settings. For example, I would like to have 2D Ouput style in bold font, which I used in Classic interface in the years of my youth. I adjusted this style as needed:

0

1

Nevertheless, output font has a normal (no-bold) style:

1

Is it possible to fix the problem?

I am using the SumOverRepeatedIndices and get a Length of Output Exceeded error. Sometimes if I close the file and restart the program then I get a result and no error.  However, if I recalculate then I get the error.

 


restart; with(Physics); with(Tetrads)

[e_, eta_, gamma_, l_, lambda_, m_, mb_, n_]

(1)

`#msup(mi("ds",mathcolor = "#af00af"),mn("2",mathcolor = "#af00af"))` := Physics:-`*`(Physics:-`*`(2, dzeta), dzetabar)+Physics:-`*`(Physics:-`*`(2, du), dv)+Physics:-`*`(Physics:-`*`(2, H(zeta, zetabar, u, v)), (du+Physics:-`*`(Ybar(zeta, zetabar, u, v), dzeta)+Physics:-`*`(Y(zeta, zetabar, u, v), dzetabar)-Physics:-`*`(Physics:-`*`(Y(zeta, zetabar, u, v), Ybar(zeta, zetabar, u, v)), dv))^2)

2*dzeta*dzetabar+2*du*dv+2*H(zeta, zetabar, u, v)*(du+Ybar(zeta, zetabar, u, v)*dzeta+Y(zeta, zetabar, u, v)*dzetabar-Y(zeta, zetabar, u, v)*Ybar(zeta, zetabar, u, v)*dv)^2

(2)

X = [zeta, zetabar, u, v]

X = [zeta, zetabar, u, v]

(3)

PDEtools:-declare(`#msup(mi("ds",mathcolor = "#af00af"),mn("2",mathcolor = "#af00af"))`)

Ybar(zeta, zetabar, u, v)*`will now be displayed as`*Ybar

(4)

Setup(coordinates = (X = [zeta, zetabar, u, v]), metric = 2*dzeta*dzetabar+2*du*dv+2*H(zeta, zetabar, u, v)*(du+Ybar(zeta, zetabar, u, v)*dzeta+Y(zeta, zetabar, u, v)*dzetabar-Y(zeta, zetabar, u, v)*Ybar(zeta, zetabar, u, v)*dv)^2)

[coordinatesystems = {X}, metric = {(1, 1) = 2*H(X)*Ybar(X)^2, (1, 2) = 1+2*H(X)*Ybar(X)*Y(X), (1, 3) = 2*H(X)*Ybar(X), (1, 4) = -2*H(X)*Ybar(X)^2*Y(X), (2, 2) = 2*H(X)*Y(X)^2, (2, 3) = 2*H(X)*Y(X), (2, 4) = -2*H(X)*Y(X)^2*Ybar(X), (3, 3) = 2*H(X), (3, 4) = 1-2*H(X)*Ybar(X)*Y(X), (4, 4) = 2*H(X)*Y(X)^2*Ybar(X)^2}]

(5)

g_[]

g_[mu, nu] = (Matrix(4, 4, {(1, 1) = 2*H(X)*Ybar(X)^2, (1, 2) = 1+2*H(X)*Ybar(X)*Y(X), (1, 3) = 2*H(X)*Ybar(X), (1, 4) = -2*H(X)*Ybar(X)^2*Y(X), (2, 1) = 1+2*H(X)*Ybar(X)*Y(X), (2, 2) = 2*H(X)*Y(X)^2, (2, 3) = 2*H(X)*Y(X), (2, 4) = -2*H(X)*Y(X)^2*Ybar(X), (3, 1) = 2*H(X)*Ybar(X), (3, 2) = 2*H(X)*Y(X), (3, 3) = 2*H(X), (3, 4) = 1-2*H(X)*Ybar(X)*Y(X), (4, 1) = -2*H(X)*Ybar(X)^2*Y(X), (4, 2) = -2*H(X)*Y(X)^2*Ybar(X), (4, 3) = 1-2*H(X)*Ybar(X)*Y(X), (4, 4) = 2*H(X)*Y(X)^2*Ybar(X)^2}))

(6)

NULL

``

eqn1 := SumOverRepeatedIndices(Physics:-`*`(d_[mu](Y(Zeta, zetabar, u, v)), e_[1, `~mu`])) = 0

`[Length of output exceeds limit of 1000000]`

(7)

eqn2 := SumOverRepeatedIndices(Physics:-`*`(d_[mu](Y(Zeta, zetabar, u, v)), e_[2, `~mu`])) = 0

`[Length of output exceeds limit of 1000000]`

(8)

eqn3 := SumOverRepeatedIndices(Physics:-`*`(d_[mu](Y(Zeta, zetabar, u, v)), e_[4, `~mu`])) = x

(1/2)*(-(diff(Y(Zeta, zetabar, u, v), zetabar))*(Y(X)*Ybar(X)+1)*2^(1/2)+(diff(Y(Zeta, zetabar, u, v), u))*2^(1/2)*(Y(X)-Ybar(X))-(diff(Y(Zeta, zetabar, u, v), v))*2^(1/2)*(Y(X)-Ybar(X)))/((-(Ybar(X)^2+1)*(Y(X)^2+1)/(Y(X)-Ybar(X))^2)^(1/2)*(Y(X)-Ybar(X))) = x

(9)

eqn1 := `[Length of output exceeds limit of 1000000]` = 0

`[Length of output exceeds limit of 1000000]` = 0

(10)

algsubs(`[Length of output exceeds limit of 1000000]` = 0, `[Length of output exceeds limit of 1000000]`)

0

(11)

``

simplify(`[Length of output exceeds limit of 1000000]`)

``


Download Derive_Eq_4.4.mw

Short question version:

print(plots[display](seq(seq...   ...)):  works fine!  Why??

Longer, more detailed question:
  print(plots[display](seq(seq...   ...)):   This Maple statement ends in a colon - so I would not have expected any output.  I'm using "pretty" print, as opposed to printf, because it automatically centers the output

    This question is actually an extension of one I posed  yesterday, under the title "How to clear Maple output" - but the question I should have been asking is: "Why is the previous output not automatically cleared?"  The main points of that question are stated below.  Any comments, suggestions gratefully received.

   David

"How to clear Maple output"

I'd like to know how the screen previous ouput can be cleared.   ...or what is the likely cause.

   At the start of my program I have:

restart;
interface(echo=0, verboseproc=0, warnlevel=0, prettyprint=1):

#I thought restart; would automatically have cleared any previous output.

The program reads necessary input (eg no of players, ..)  using:

x:=readline(terminal):

I have written a program which plays the game of Multicube, a commercially made boardgame. It works OK except that when the game is replayed, the previous game output stays on the screen.  This is rather distracting and I'd like the screen cleared when a new game is run.   I'd like to know how the screen previous ouput can be cleared.   ...or what is the likely cause.

   At the start of my program I have:

restart;
interface(echo=0, verboseproc=0, warnlevel=0, prettyprint=1):

#I thought restart; would automatically have cleared any previous output.

The program reads necessary input (eg no of players, ..)  using:

x:=readline(terminal):

 

Thanks,  David

 

 

Hi

I'm trying make Maple write the actual result, when i differenting an expression: x[s] := x(t)+sin(theta(t))*a.
when i differentiate with respect to t, i get:

> diff(x[s], t);
=
print(`output redirected...`); # input placeholder
/ d \ / d \
|--- ()(t)| + cos(theta(t)) |--- theta(t)| a
\ dt / \ dt /

Maple, writes the expression as a table, but i need to see the normal function? Why does it do that? And how can i make it show the expression as a normal function?


When i derive the two parts serperately i get the normal result, but as soon as i add them together, i get the table rasult again?

Is there an easy trick for this one?

-Nicolai

 

 

1 2 3 4 5 6 7 Last Page 1 of 9