[pstricks] \psplotDiffEqn initial conditions using \multido
Dominique RODRIGUEZ
dominique.rodriguez at waika9.com
Fri Jun 23 21:35:35 CEST 2006
> Hi:
> I am trying to generate phase portraits of differential equations using
> \psplotDiffEqn. I would like to specify different initial conditions using a
> \multido environment. I have tried Number (\N) and real (\R) variables
> without success. Is there a way to do it?
>
> Thanks in advance.
> Below, I include a small example of what I want
>
> Hernando Diaz
>
> \documentclass{minimal}
> \usepackage{pstricks,pstricks-add}
> \begin{document}
> \def\Func{y[1]|0.5*y[1]-y[0]-y[1]^3}
> \psset{unit=2cm,algebraic=true,linewidth=0.5pt}
> \begin {pspicture}(-3,-3)(3,3)%\psgrid[subgriddiv=2,griddots=10]
> \psframe(-3,-3)(3,3)
> \psset{method=rk4,plotpoints=400,linecolor=blue,linewidth=0.5pt}
> \psset{whichabs=0,whichord=1}
> %\multido{\r=-1.5+1.5}{3}{
> \psplotDiffEqn{0}{30}{-1.5 -3}{\Func}
> \psplotDiffEqn{0}{30}{0 -3}{\Func}
> \psplotDiffEqn{0}{30}{1.5 -3}{\Func}
> \psplotDiffEqn{0}{30}{-1.5 3}{\Func}
> \psplotDiffEqn{0}{30}{0 3}{\Func}
> \psplotDiffEqn{0}{30}{1.5 3}{\Func}
> %}
> \psplotDiffEqn[whichabs=0,whichord=1]{0}{30}{0.01 0.01}{\Func}
> \end{pspicture}
> \end{document}
this works :
\multido{\r=-1.5+1.5}{3}{
\psplotDiffEqn{0}{30}{\r\space -3}{\Func}
\psplotDiffEqn{0}{30}{\r\space 3}{\Func}
}
Dominique
--
Les Galinières - 07460 St André de C. FRANCE-- tel: (+33)475.39.05.82
More information about the PSTricks
mailing list