Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Using NDSolve with an array' topicStudent Support Forum > General > Archives > "Using NDSolve with an array"

Next Comment >Help | Reply To Topic
Author Comment/Response
buggler
07/19/12 05:44am

Hello, I am trying to use NDSolve to solve a rather large set of equations however it is not storing the resulting substitution rules into the array in the way I expected, rather it's adding $number's to it

My code is more or less something like this:

For[i=1, i <= N, i++,
Eq1 = <some function of i>
sol1[i] = NDSolve[{Eq1[[1]] == 0, Eq1[[2]] == 0, <initial condiitons>, {x1[t], x2[t]}, {t, 0, 1}];
For[j = 1, j <= N, j++,
Eq2 = <some function of i, j>
sol2[[i, j]] = NDSolve[{Eq2[[1]] == 0, Eq2[[2]] == 0, {y1[t], y2[t]}, {t, 0, 1}];
];
];

Then I inspect sol2[[1,1]] and I get something like:

{y1$13861[t]->InterpolatingFunction[{{0.,1.}},<>][t],y2$13861[t]->InterpolatingFunction[{{0.,1.}},<>][t]}

and so I can't apply {y1[t], y2[t]} /. output

Any ideas how to stop Mathematica from adding the $numbers to my function name?

Thanks

For the actual code and not the summarised version above, http://pastebin.com/HsqX2BEE

URL: ,

Subject (listing for 'Using NDSolve with an array')
Author Date Posted
Using NDSolve with an array buggler 07/19/12 05:44am
Re: Using NDSolve with an array buggler 07/19/12 9:19pm
Next Comment >Help | Reply To Topic