Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'using table in a while loop' topicStudent Support Forum > General > "using table in a while loop"

Help | Reply To Topic
Author Comment/Response
06/04/12 05:12am

Hello All,

i have two differentical equation with a variable parameter "p"
y''[t] == (1/(p*p))*x[t],
x'[t] == -y'[t] - x[t] + 10,

i defined event with "event locator method" in the ndsolve of differential equation.

i defined function to have the step for the variation of the parameter "zt". zt is a variable step (not constant)

I solved equations from event to event in a time interval, but my problem is how to plot all the variation of the parameter "p" at each event.

i have defined a table that contains all possible value of "p" with the step zt


and then try to solve equation from event to event with variation at each one.
tf = 0;
ss = Reap[
While[tf < 10, Sow[sol[p, tf]]]][[2, 1]
i am not sur that is the best solution or i should use a table of tables or a liste that each element is a list of elements

any suggestion

Attachment: one way.nb, URL: ,
Help | Reply To Topic