vuishl

98 Reputation

6 Badges

9 years, 222 days

MaplePrimes Activity


These are questions asked by vuishl

Seems that I don't know how to organize a nested loop.

Simple example:

for i by 2 to 19 do

for k from 2 to 26 do

A := i*k

end do

end do

Nothing is returned here (when I expected a list of different values for A).

___________________

Hi everyone.

For example, I have

...

plo[i] := plot([u[i](t), v[i](t), t = k[i] .. k[i+1]])

...

Now I want to draw all these plots on the same picture:

with(plots):display([plo[1],plo[2],plo[3],..........................................]);

How can I place all plots in brackets? Number of iterations varies, and there are a lot of sets of iterations, so I need a universal way to do it.

Tried to use Array() but didn't suceed.

Thanks for help!

Hi everyone.

I have a loop in which initial data of ODE is found on every iteration and is substituted to find new solution. The system is striking 1 or -1 and x'(t) changes its sign, to -x'(t)

I do it this way (k[i] stands for the values of time t):

Hi everyone.

I have a loop in which initial data of ODE is found on every iteration and is substituted to find new solution. The system is striking 1 or -1 and x'(t) changes its sign, to -x'(t)

I do it this way (k[i] stands for the values of time t):

In my system initial data is changed on every iteration. I find new equation, then find when some condition is met, calculate new initial data and go on with it. But there are errors in the very beginning.

Example:

ODE := diff(diff(x(t), t), t)+.2*(diff(x(t), t))-x(t) = 0.8*sin(t)
t[1] := 0;
ics[1] := x(t[1]) = .2, (D(x))(t[1]) = 5
X[1] := dsolve({ODE, ics[1]})

I encounter two problems:

1 2 3 Page 2 of 3