Hello.<br>I'm trying to make a comparison between diverse methods for solving differential equation.<br>I cannot use ode or any related command since the aim is to get a proper code which will help me compare the efficiency of the methods.<br>
I open a discussion  on usenet. <a href="http://groups.google.fr/group/comp.soft-sys.math.scilab/browse_thread/thread/875cb3e8e2e80c09?hl=fr#">http://groups.google.fr/group/comp.soft-sys.math.scilab/browse_thread/thread/875cb3e8e2e80c09?hl=fr#</a><br>
So war i got.<br><br> <p>// Set the value of h to chose a step size. <br> h=0.001; <br> //set the value of imax to chose the number of iteration. <br> imax=200; <br> </p><p>//Set the values of Xo, Yo, and Zo which are inital condition <br>
 Xo=10; <br> Yo=10; <br> Zo=10 <br> Unit=[Xo;Yo;Zo]; <br> //Set values of sigma=s, r and beta=b <br> s=10; <br> r=28; <br> b=2.67; <br> </p><p>fdx=mopen('C:\lorenz attractor\Lorenz attractorx.txt','wb') <br>
 for i=1:imax, <br>   X=Xo+(-s*Xo+s*Yo)*h; <br>   Y=Yo+(-Xo*Zo+r*Xo-Yo)*h; <br>   Z=Zo+(Xo*Yo-b*Zo)*h; <br>   Xo=X; <br>   Yo=Y; <br>   Zo=Z; <br>   save(fdx,X,Y,Z),  // save data in file <br>  end <br>   mclose(fdx) <br>
 </p><p>  fdx=mopen('C:\lorenz attractor\Lorenz attractorx.txt','rb') <br> </p><p>  for k=1:imax, load(fdx,'X','Y','Z');X;end  // read data from file <br>   for k=1:imax, load(fdx,'X','Y','Z');Y;end <br>
   for k=1:imax, load(fdx,'X','Y','Z');Z;end <br> </p>mclose(fdx); <br><br>The problem is that I cannot obtain the values of X, Y and Z as a vector.<br>I need that in order to plot 2d and 3d graphs of the lorenz equation.<br>
<br>If anybody as any clue please let me know.<br>Kind regards from France.<br><br><br>