ThU

891 Reputation

13 Badges

12 years, 339 days

MaplePrimes Activity


These are questions asked by ThU

Check these 3 code lines. a,b are some reals.

s:=a/b

g:=(a,b)->s

g(1,2)

yields a/b

Is it possible to make Maple spit out 1/2, maybe with some default setting command? I still want to keep the function call format g() , so no eval(g(),...)

 

 

 

 

How can I archive color coding? The two plots are colored the same, but I want them to be colored according to one common color scale, which means that each z value is assigned to a unique color for the 2 function plot.

f1 := proc (x, y) options operator, arrow; sin((1/2)*y+(1/2)*x) end proc;f2 := f1+2;
p1:=plot3d(f1, 0..10, 0..20, style=patch, color=proc(x,y) x*y end proc);p2:=plot3d(f2, 0..10, 0..20, style=patch, color=proc(x,y) x*y end proc);
plots[display](p1,p2);

How would you do the substitution below?

eq1 := ((2*mu[2]-2)*R[S]*B[n]*lambda[0]*mu[3]*n^2*N[p]^2+(-2*mu[2]+2*mu[2]^2)*R[S]*B[n]*lambda[0]*n^2*N[p]^2+d^2)/(d^2+b*n);

 eq2 := algsubs((2*mu[2]-2)*R[S]*B[n]*lambda[0]*mu[3]*n^2*N[p]^2 = q11, eq1);

Thanks

Let's say we have the response of a discrete system  to a unit step, the measured data is available as a vector in Maple. As example: seq(evalf[2](exp(-n/5)*sin(n)),n=0..20);

How can I find the coefficients of the transfer function G(z)=(a1*z+a2)/(b1*z^2+b2*z+b3)?

Here is a paper that describes on page 27ff how to do this with regression.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.136.373&rep=rep1&type=pdf

Maybe there is a better way.

#Could you check how to generate a correct plot? I use Sum here because nested add commands didn't work.

restart;
S := proc (x) options operator, arrow; 1+Sum(floor((x/(Sum(floor(cos(Pi*(factorial(n-1)+1)/n)^2), n = 1 .. r)))^(1/x)), r = 1 .. 2^x) end proc;

#This yields the Prime number sequence, try seq(value(S(x)), x = 1 .. 7);

#Problem:

# Plot seems wrong:
plot(S(x), x = 1 .. 7);

#Raising Digits >15 results in empty plots

1 2 3 Page 2 of 3