Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

We want to add 5 to the list L:

with(ListTools):

L:=[1,3,6,7];

L:=[L,5];

L:=Flatten(L);

 

I think there must be an easier way to do this, I would be thankful if someone let me know.

Can we define functions in Maple? If so, what is the difference between a user-defined function and a procedure?

I have a loop in my program. It sometimes takes a long time to run. I want to output a value of a variable that indicate how many jobs has been done. Since this value changes constantly, so the ordinary print method will generate a large amount output. Is there any way I can make this value shows in just one area dynamically?

 

The usual optimization constraint in Maple looks like: con := [ w[1] <= 1,  w[2] <= 1,  w[1] >= -1,  w[2] >= -1, w[1] + w[2] = 1 ]

 I was wondering if it is possible to have a constraint where the

different weights w[1] , w[2]  can only take the values   -1 , 0 , 1   

Hi there,

Good Morning,

Would anybody be kind to help me with the attached worksheet. Most of the worksheet worked except for the last procedure where I was trying to call a procedure called cog that output the center of gravity of a concrete block xyzc in another procedure called Inertia. Please, how do I acheived this in Maple.

Regards

Moses

I regularly choose a function for my numerical analysis class that looks bad (i.e., has jumps) when graphed on a small domain.  For example,

plot(ln(1+x), x = -10^(-15) .. 10^(-15))

If I increase Digits or use a Taylor series to replace ln(1+x), the graph looks fine.

I tried this with cos(x) - x as follows:

plot(cos(x)-x, x = -10^(-16) .. 10^(-16))

Hello,

I have an equation which is   Y=A*x^3 +B*x.     Y=-60..60  and  x=-1..1

How can I find the A and B parameters using Maple?

thanks

Bengu

<p>I have the following code:</p>
<p> </p>
<p> for D5d_counter from 1 to 1000 do<br />
increment := 0.1:<br />
D5d_incr := initial_D5d + increment:<br />
D5d_decr := initial_D5d - increment:<br />
energy_D5d_init := energy1d(initial_D5d);<br />
energy_D5d_incr:= energy1d(D5d_incr);<br />
energy_D5d_decr := energy1d(D5d_decr);<br />
#evalM(cat("plot(",convert(P[1],string), ",",convert(P[2],string), ", '+')"))</p>

I have always wanted to know why the lognormal distribution in the Black & Scholes (BS) option pricing model

is assumed to have a mean of  T*(r-0.5*sigma^2 ) . I have seen various explanation but non that make any sense.

I know that the mean in a lognormal distribution is exp(u+0.5*sigma^2) but why does it suddenly become

T*(r-0.5*sigma^2 ) in the BS model ?   I can understand the T = mean proportional to the time increament but why does

How can I extract the order of a number in a list?

e.g.

L:=[1,3,5,8,9];

Order(3)=2

Order(9)=5

Hi,

Reading about the "Table of Chords" of Ptolemy, I stumbled on something I thought should be easy in Maple.

For example, in the table, I have that the chord length  for 1/2 degrees (with radius 60 of course) = 0;31,25 wiich mean 0+31/60+25/(60)^2=377/720=0.52361.

What I would like to do in Maple is evalf[6](sin(1/2 degree))=0.008728 and then convert the decimal part of the answer into a list so I can do

How do I define a large multivariate polynomial

For all i, j, k, l, m, n from 1 to 2

         sum t = 0 to 7: x_{i,j, t} * y_{k,l, t} * z_{m,n, t}

in maple?

 

Hello,

I'm new to maple's datastructures. Is it possible to store some rather complicated data in the nodes (or leafs) of a n-nary Tree? Are there also B-Trees?

Hi everybody?

I have a small bug when create a maplet for a simple logical example.

> myMaplet := Maplet(Window(title="Logic Test",
[
["A : ", TextField['A'](5),
 "B : ", TextField['B'](5)],
["A = B?", TextField['TF'](10)],
[Button['EX']("Do", onclick=ACT),
 Button['QT']("Quit", enabled=true, Shutdown())]
 ]),
Action[ACT](Evaluate('TF'=evalb(eval(A=B))))
):
>Maplets[Display](myMaplet);
 

First 1902 1903 1904 1905 1906 1907 1908 Last Page 1904 of 2219