MaplePrimes Questions

In the attached document, I have made use of both commands as follows.

a:=GetProperty(SliderA,"value");

b:=GetProperty(SliderB,value);

Both are working alright. How is it possible? Which one is desirable?


 

a:

b:

For sliderA, GetProperty(SliderA,"value") is used.

For sliderB, GetProperty(SliderB,value) is used.

Both are working alright. How? Which one is more desirable?

``


 

Download Doubt_on_SliderCommand.mw

Thanks for answering.

Ramakrishnan V

This works fine, but I was wondering whether it could be done in a simple way.
 

``

restart; kernelopts(version); interface(version)

`Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973`

 

`Standard Worksheet Interface, Maple 2018.2, Windows 10, November 16 2018 Build ID 1362973`

(1)

kollect := proc (p::`+`, y) local x; subs(x = y, collect(subs(y = x, p), x)) end proc

kollect(kollect(kollect(kollect(expand(add(mul(k)*add(k), `in`(k, combinat:-choose([i1, i2, i3, i4], 3)))), i1^2), i2^2), i3^2), i4^2)

(i1*i2+i1*i3+i2*i3)*i4^2+(i1*i2+i1*i4+i2*i4)*i3^2+(i1*i3+i1*i4+i3*i4)*i2^2+(i2*i3+i2*i4+i3*i4)*i1^2

(2)

``


thanks in advance,

Harry

Download nested_comb.mw

Can anyone tell me what is the command to calculate maximum absolute error in mapple.

restart;
A002487 := proc (m) local a, b, n; option remember; a := 1; b := 0; n := m; while 0 < n do if type(n, odd) then b := a+b else a := a+b end if; n := floor((1/2)*n) end do; b end proc; listeinverse := proc (L::list) local i; [seq(op(nops(L)-i, L), i = 0 .. nops(L)-1)] end proc; Brocot := proc (n) local c, i, L, M, r; L := NULL; r := 2^n; L := [seq(A002487(i), i = 0 .. r)]; M := listeinverse(L); c[0] := 0, 1/cat(0); for i to r do c[i] := L[i]/M[i] end do; c[r+1] := 1/cat(0); return [seq(c[i], i = 1 .. r+1)], r+1 end proc; for i from 0 to 4 do B || i := Brocot(i) end do;
                              [   1]   
                        B0 := [0, -], 2
                              [   0]   
                             [      1]   
                       B1 := [0, 1, -], 3
                             [      0]   
                          [   1        1]   
                    B2 := [0, -, 1, 2, -], 5
                          [   2        0]   
                    [   1  1  2     3        1]   
              B3 := [0, -, -, -, 1, -, 2, 3, -], 9
                    [   3  2  3     2        0]   
       [   1  1  2  1  3  2  3     4  3  5     5        1]    
 B4 := [0, -, -, -, -, -, -, -, 1, -, -, -, 2, -, 3, 4, -], 17
       [   4  3  5  2  5  3  4     3  2  3     2        0]    
              rang := proc(M::list, a)  ...  end;;
                    /       1\ 
                rang|B2[1], -|;
                    \       2/ 
                / d        \        
                |--- don(x)| t work;
                \ dx       /        

F := proc (N) local a, b, L; L := NULL; L := sort([op({seq(seq(a/b, a = 0 .. b), b = 1 .. N)})]); return L, nops(L) end proc; F(1); F(2); F(3); F(4);
                           [0, 1], 2
                          [   1   ]   
                          [0, -, 1], 3
                          [   2   ]   
                       [   1  1  2   ]   
                       [0, -, -, -, 1], 5
                       [   3  2  3   ]   
                    [   1  1  1  2  3   ]   
                    [0, -, -, -, -, -, 1], 7
                    [   4  3  2  3  4   ]   
rang(F(3)[1], 2/3);
                        /[   1  1  2   ]  2\
                    rang|[0, -, -, -, 1], -|
                        \[   3  2  3   ]  3/

Hi everyone, I have some symbolic expressions as below:

restart;

local(Zeta);

Zeta := phi+(Ems+I*Eml)/(Ef-Ems-I*Eml)+(3*(1-phi))*((1-g)*alpha^2-(1/2)*g)/(alpha^2-1): 

g := (1/2)*Pi*alpha:

Lambda := (1-phi)*((3*(alpha^2+.25))*g-2*alpha^2)/(alpha^2-1): 

Ec := (Ems+I*Eml)/(1-(1/4)*phi*(1/Zeta+3/(Zeta+Lambda))):

a := simplify(Re(Ec)), assuming positive;

the output of the code maple gives me as 'a' is very long and boring! Therefore I want to make it shorter. Since (alpha<<1), I want to set a constraint as (alpha^(2 and more than 2)=0). How can I put that constraint on the output? thanks

sort(abs(z+a+b*i),z,descending) mean type z is sign + but print -z+5i-5

ran := rand(-5 .. 5); -1; a := ran(); -1; b := ran(); -1; sort(abs(b*i+a+z), z, descending)

abs(-z+5*i-5)

(1)

``


Can you help me?

Thank you very much.

Download abs.mw

help pls how to convert a data surface into a region:

surfdata([[1, 1, .69], [1, 2, .48], [2, 1, .37], [2, 2, .44]], axes = frame, labels = [x, y, z], filled = true)

I've tried to fill the volume below using the option "filled " without any results. I will appreciate any suggestion

Hello

After getting help from users on this list, I wrote an example on how to iterate a discrete map using a given initial condition as follows:

restart:with(ListTools):
NestList := proc (f, x, n::nonnegint, nprec::posint := 10) local R, k; R := rtable(0 .. n, [x]); Digits := nprec; for k to n do R[k] := expand(f(R[k-1])) end do; [seq(R)] end proc:
logistic := proc (x) options operator, arrow; 4*x*(1-x) end proc:
fp := [solve((logistic@@5)(x) = x, x)]:
cfp := allvalues(fp[5]);
nstep:=12:
p := nstep+50; 
aaa := Flatten(map(`~`[Re], evalf(NestList(logistic, evalf(cfp), p)))); 
dat := [seq([i-nstep-1, aaa[i]], i = 1 .. p)]; 
plot(dat, style = pointline, symbol = solidcircle, symbolsize = 4, thickness = 0, view = [default, 0 .. 1]);

The result should be a period 5 and some chaotic data due to machine precision. However the trajectory ejected to infinity. I have tried with a different initial condition, say 0.1, and it worked just fine. Even if the precision is increased, the trajectory (orbit) will eventually eject to infinity.  I couldn't spot what is wrong.

I am running Maple 2017 on linux and on a mac. 

Many thanks

Ed

 

Hello

 

I need help creating a proceadure that does the following:

 

It takes two lists of the same length N   (0<N<inf), one is the numerical pivote list P and the other is a symbolic target list S.

 

Lets say for the simple case of N=3 that we input:

 

P=[22.5,14.3,78.2]

S=[x[1],x[2],x[3]]

 

First the proceadure will sort the Pivote list P, which will result in a local variable Ps=[14.3,22.5,78.2]

 

Next it will generate the rearanged indices of S when it was transformed into Ps, meaning the sort indices rearangment from [1,2,3] in S into [2,1,3] in Ps. This will result in another local variable PSI=[2,1,3]

 

Finally, the proceadure will use PSI to rearange (sort by proxy) the target list P, which in this case will result in the folowing output of [x[2],x[1],x[3]], where x[i] can be either symbolic variable or numeric.

 

So what I need is to use numeric list P to sort a non numeric list S of the same size.

 

I'd appreciate any tips or usefule commands that I can use in this proceadure. 

 

Thanks

 

 

Dear all,
how to code matrix X properly? I want the index of element of matrix is obtained from set S. Since s = {1,5,6}, in matrix X, i should get x11,x15,x16 and so on.
Do you know how to solve this?

Thank you anyway

Hi people,

I could not find anything similar. I hope I do not repeat and that someone may help me on this one.

How can I most elegantly and quickly create a vector (array, matrix, ...) of individual time dependent variables in Maple 17? Something like

 

myArray := ( (elem_1_1(t), elem_2_1(t), ...), (elem_1_2(t), elem_2_2(t), ...), ... )

 

All suggetions appreciated.

the function rationalize simplify rational expression that contains complicated expression but in this example it doesn't work

rationalize(1/sqrt(x))

1/sqrt(x)

it gives to me the same expression why ?

 


 

restart

N := int((x-Q)^m*f(x), x = Q .. infinity)

int((x-Q)^m*f(x), x = Q .. infinity)

(1)

Cost := a*N

a*(int((x-Q)^m*f(x), x = Q .. infinity))

(2)

Dcost := diff(Cost, Q)

a*(int(-(x-Q)^m*m*f(x)/(x-Q), x = Q .. infinity))

(3)

Val := eval(Dcost, [m = 2, f(x) = 1/5000, co = 25, cs = 15])

-a*infinity

(4)

``


 

Download dummy.mw

How come I got this:

as an output of plot(sqrt(Pi/(2*x))*BesselJ(3+1/2, x), x = 0 .. 0.5e-1),

and got this:

for plot(sqrt(Pi/(2*x))*BesselJ(3+.5, x), x = 0 .. 0.5e-1).

Is 1/2 so much different from 0.5 to make Bessel function misbehave at small arguments?? Or is it just a bug?

Hello Please,

 

I have been have difficulty generation a random number from a regression model.

Could you please help me out?

For example; Suppose I want to generate random number from Possion model, I trying using the codes below but not working 

  

 Please, help me edit it.

 

 

Jamiu Olumoh

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