Lorenz equation
clear;
a=10;b=28;c=8/3;
controlVar(a,1,b,1,c,1);
lor1( x1, x2, x3, t ) = a * (x2 - x1);
lor2( x1, x2, x3, t ) = b*x1 - x2 - x1*x3;
lor3( x1, x2, x3, t ) = x1*x2 - c*x3;
x=0; y=1; z=0;
controlVar(x,.1,y,.1,z,.1);
startP=0; endP=100; numberSamples=10000;
rk1( lor1,//the system
lor2,
lor3,
x, y, z, //the initial condition
startP, //the start point
endP, //the end point
numberSamples, /*number of samples*/
"_rk");
plot3(_rk_0,_rk_1,_rk_2,0,30);
plot(_rk_0,_rk_1,_rk_2);
Rosseler equation
clear();
a=.2; b=.2; c=5.7;
x0=0.001; y0=1; z0=0.001;
startP=0; endP=100; numberSamples=1000;
controlVar( a, b, c, x0, y0, z0, startP, endP );
rsslr22( x1, x2, x3, t, a1 ) = x1 + a1*x2;
rsslr33( x1, x2, x3, t, b1, c1 ) = b1 + x3*(x1-c1);
rsslr1( x1, x2, x3, t ) = -x2 - x3;
rsslr2( x1, x2, x3, t ) = rsslr22( x1, x2, x3, t, a );
rsslr3( x1, x2, x3, t ) = rsslr33( x1, x2, x3, t, b, c );
rk1(
rsslr1,//the system
rsslr2,
rsslr3,
x0, y0, z0, //the initial condition
startP, //the start point
endP, //the end point
numberSamples, /*number of samples*/
"_rk1");
plot3("zPlot3PlugInDemo1",_rk1_0,_rk1_1,_rk1_2,0,100);