Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Plotting Results of NDsolve' topicStudent Support Forum > General > Archives > "Plotting Results of NDsolve"

Help | Reply To Topic
Author Comment/Response
xlr8t
02/14/12 03:09am

Hi,
I'm solving a simple ODE with NDSOLVE:
Sol =
NDSolve[EqOfMot /. params, {theta}, {t, 0, tEnd},
MaxSteps -> 10000];

I can then plot the results with e.g.:
Plot[Evaluate[{ForceX /. params} /. KiteSol], {t, 0, tEnd},
AxesLabel -> {"t", "N"}, PlotLabel -> "FORCE", AspectRatio -> 1/1,
PlotStyle -> Thick, ColorFunction -> Function[{t, x}, Hue[t/1]],
ColorFunctionScaling -> True],

Which works fine but I also want to plot these forces in another coordinate frame and this transformation into another vector is already done before the NDSOLVE.
It looks like this:

rFA = {ForceX, ForceY, 0};
bFA = Abw.Awr.rFA;

where Abw and Awr are coordinate transformation matrices.
When I then extract an element of the vector bFA with

bForceX = bFA[[1]];
and then want to plot it with
Plot[Evaluate[{bForceX /. params} /. KiteSol], {t, 0, tEnd},
AxesLabel -> {"t", "N"}, PlotLabel -> "FORCE", AspectRatio -> 1/1,
PlotStyle -> Thick, ColorFunction -> Function[{t, x}, Hue[t/1]],
ColorFunctionScaling -> True],

There is no output nor any error message. Looking how bForceX looks like, it seems there is something weird with the parameter [t]:
bForceX[[1]] /. params /. Sol =
{1.3903750000000001*(100.*Abs[Sin[InterpolatingFunction[][t]]]^2 +
Abs[
10*Cos[InterpolatingFunction[][t]] -
25*InterpolatingFunction[][t]]^2)*
(0.3*
Cos[ArcTan[2*Sin[InterpolatingFunction[][t]],
2*Cos[InterpolatingFunction[][t]] -
5*InterpolatingFunction[][t]][t]] -
1.2*
Sin[ArcTan[2*Sin[InterpolatingFunction[][t]],
2*Cos[InterpolatingFunction[][t]] -
5*InterpolatingFunction[][t]][t]])}

Does anyone know what the problem could be?
Thanks for any help!

URL: ,
Help | Reply To Topic