Preben Alsholm

13743 Reputation

22 Badges

20 years, 331 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

If I count correctly then there are 6*nn + (nk+1)*Q variables and the same number of equations.

In order to use GenerateMatrix you need nn, nk, and Q to be positive integers, and you should replace Sum by sum (using value e.g.) or replace Sum by add.

But the problem was the type check. So if that is added then you still need '',

x := (i::integer) -> i^2:
sum(x(m), m=1..3);
sum('x(m)', m=1..3);

But the problem was the type check. So if that is added then you still need '',

x := (i::integer) -> i^2:
sum(x(m), m=1..3);
sum('x(m)', m=1..3);

@alex_01 Knowing nothing about what you are trying to do, I tried doing

eval(ob,{x[1]=0,x[2]=0,x[3]=0});

which results in  0.8571428571/x[4], which means that with the constraint con1 you can make this as small (and negative) as you like.

Did you leave something out?

@alex_01 Knowing nothing about what you are trying to do, I tried doing

eval(ob,{x[1]=0,x[2]=0,x[3]=0});

which results in  0.8571428571/x[4], which means that with the constraint con1 you can make this as small (and negative) as you like.

Did you leave something out?

This seems to be a known problem. It is apparently not easy to fix, or it would have been done a long time ago.

In the help page for solvefor we read:

Important: The solvefor command has been deprecated.  Use the superseding command solve instead.

In the help page for solvefor we read:

Important: The solvefor command has been deprecated.  Use the superseding command solve instead.

A Google search led to

http://www.mapleprimes.com/questions/36748-Maplesofts-Direction-After-Take-Over

and

http://www.walkingrandomly.com/?p=1563

A Google search led to

http://www.mapleprimes.com/questions/36748-Maplesofts-Direction-After-Take-Over

and

http://www.walkingrandomly.com/?p=1563

@Wang Gaoteng

with(plots):
equ := 2+(s+1)*exp(tau*s) = 0;
res0:=solve(equ,s);
complexplot(res0,tau=0..3,thickness=3);
#res0 leaves the real axis at
solve(-2*tau*exp(tau)=-exp(-1),tau);
evalf(%);
animate(complexplot,[res0,tau=0..T,thickness=3],T=0.15..0.16);
#Animating in a different interval to examine the crossing with the imaginary axis:
animate(complexplot,[res0,tau=1.15..T,thickness=3],T=1.15..1.25);
#Numerical solution:
tf:=fsolve(Re(res0)=0,tau=1.125);
eval(res0,tau=tf);
identify(%);
#The exact crossing may be at that value and happens when tau has the value:
solve(res0=I*sqrt(3),tau);
te:=evalc(%);
evalf(te);
#Checking:
eval(res0-I*sqrt(3),tau=te);
simplify(%);
evalf(%);

@Wang Gaoteng

with(plots):
equ := 2+(s+1)*exp(tau*s) = 0;
res0:=solve(equ,s);
complexplot(res0,tau=0..3,thickness=3);
#res0 leaves the real axis at
solve(-2*tau*exp(tau)=-exp(-1),tau);
evalf(%);
animate(complexplot,[res0,tau=0..T,thickness=3],T=0.15..0.16);
#Animating in a different interval to examine the crossing with the imaginary axis:
animate(complexplot,[res0,tau=1.15..T,thickness=3],T=1.15..1.25);
#Numerical solution:
tf:=fsolve(Re(res0)=0,tau=1.125);
eval(res0,tau=tf);
identify(%);
#The exact crossing may be at that value and happens when tau has the value:
solve(res0=I*sqrt(3),tau);
te:=evalc(%);
evalf(te);
#Checking:
eval(res0-I*sqrt(3),tau=te);
simplify(%);
evalf(%);

I use animations quite a lot. The ones in the following link were used on the web site's front page one semester. To be honest, I don't think they were appreciated, but I had fun.

The minimal descriptions in the following are in Danish, but the code is provided.

On the web page in the link you click on "Gamle forsideopgaver og illustrationer".

A few are not animations but were also supposed to be appetizers.

http://alsholm.dk/Kurser/01007/index.php?id=10027

Without looking too closely at what you are doing setoptions3d does seem to me to work.

Why do you have both of 'axes = NONE' and 'axes = NORMAL' in several  commands?

First 212 213 214 215 216 217 218 Last Page 214 of 231