| 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: , |
|