| Author |
Comment/Response |
Ali
|
02/27/08 12:08pm
So I have a loop and everytime I calculate an interpolation function by numerical integration but this integration uses the value of the function in the former iteration and I am looking for a way to keep that for the next iteration step. For example:
f1[y_] := 1 - y;
For[sn = 0, sn < 10, sn++,
f0 = f1;
f1 = First[
f /. NDSolve[{f''[y]/(1 + (f'[y])^2)^1.5 ==
f0''[y]/(1 + (f0'[y])^2)^1.5 + 0.001, f[1] == f0[1],
f'[1] == f0'[1]}, f, {y, 0, 1}]];
]
But the problem is that when Mathematica is calculating f1 for the next iteration the value of f0 changes as well and I lose the information from the last iteration.
So I am basicly looking for a way to duplicate a function in which the target is independent of the source and if I change the source the target will stay intact.
Thanks in advance
URL: , |
|