Re: directionfields from StreamPlot looks different from solution

*To*: mathgroup at smc.vnet.net*Subject*: [mg100624] Re: directionfields from StreamPlot looks different from solution*From*: dh <dh at metrohm.com>*Date*: Tue, 9 Jun 2009 06:37:12 -0400 (EDT)*References*: <h0bteg$8ge$1@smc.vnet.net>

Hi Sean, VectorPlot and StreamPlot do not show the same. VectorPlot obviously plots a vector field, showing vector of different length. StreamPlot on the other hand does not bother about the size of the vectors (velocity), it only gives directions. Nevertheless, you must feed StreamPlot with vectors (velocities). Daniel sean_incali at yahoo.com wrote: > I don't think I'm using StreamPlot properly. > > Consider the following non-autonomous ODE > > y'[t] == (t^2) - y[t] > > Solutions for various ICs can be viewed by the following. > > sol= Table[NDSolve[{y'[t] == (t^2) - y[t], y[0] == y0}, y[t], {t, -4, > 4}], {y0, 0, 6, 0.5}]; > > Plot[Evaluate[y[t] /. sol], {t, -4, 4}, PlotRange -> {{-4, 4}, {-2, > 10}}] > > Shouldn't Vector fields be similar to the solutions above? If I plot t > on x-axis vs. t^2-y on y axis... > > VectorPlot[{t, (t^2) - y}, {t, -4, 4}, {y, -2, 10}] > > StreamPlot[{t, (t^2) - y}, {t, -4, 4}, {y, -2, 10}] > > I don't get similar results... > > What is the reason for this? > > Thanks much in advance > > Sean > > > >