diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /27/CH8 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '27/CH8')
-rwxr-xr-x | 27/CH8/EX8.1.1/8_1_1.jpg | bin | 0 -> 31068 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.1.1/8_1_1_2.jpg | bin | 0 -> 34056 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.1.1/Example_8_1_1.sce | 53 | ||||
-rwxr-xr-x | 27/CH8/EX8.1.2/8_1_2.jpg | bin | 0 -> 44735 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.1.2/8_1_2_2.jpg | bin | 0 -> 24329 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.1.2/Example_8_1_2.sce | 73 | ||||
-rwxr-xr-x | 27/CH8/EX8.1.3/8_1_3.jpg | bin | 0 -> 27670 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.1.3/Example_8_1_3.sce | 22 | ||||
-rwxr-xr-x | 27/CH8/EX8.2.1/8_2_1.jpg | bin | 0 -> 67888 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.2.1/Example_8_2_1.sce | 22 | ||||
-rwxr-xr-x | 27/CH8/EX8.3.1/8_3_1.jpg | bin | 0 -> 95207 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.3.1/Example_8_3_1.sce | 23 | ||||
-rwxr-xr-x | 27/CH8/EX8.3.2/8_3_2.jpg | bin | 0 -> 58954 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.3.2/8_3_2_2.jpg | bin | 0 -> 54412 bytes | |||
-rwxr-xr-x | 27/CH8/EX8.3.2/Example_8_3_2.sce | 47 |
15 files changed, 240 insertions, 0 deletions
diff --git a/27/CH8/EX8.1.1/8_1_1.jpg b/27/CH8/EX8.1.1/8_1_1.jpg Binary files differnew file mode 100755 index 000000000..213639e71 --- /dev/null +++ b/27/CH8/EX8.1.1/8_1_1.jpg diff --git a/27/CH8/EX8.1.1/8_1_1_2.jpg b/27/CH8/EX8.1.1/8_1_1_2.jpg Binary files differnew file mode 100755 index 000000000..0d2d1db4c --- /dev/null +++ b/27/CH8/EX8.1.1/8_1_1_2.jpg diff --git a/27/CH8/EX8.1.1/Example_8_1_1.sce b/27/CH8/EX8.1.1/Example_8_1_1.sce new file mode 100755 index 000000000..bc2859744 --- /dev/null +++ b/27/CH8/EX8.1.1/Example_8_1_1.sce @@ -0,0 +1,53 @@ +clear;
+clear;
+clc;
+close;
+set(gca(),"auto_clear","off") //hold on
+
+a=0.4;
+b=0.8;
+for x=0:0.1:3
+ y1=a*x;
+ y2=(x^2)/(b*(1+x^2));
+ plot2d(x,y1,style=-2)
+ plot2d(x,y2,style=-3)
+end
+
+// Classification of fixed points :
+
+A1=[-a 1;0 -b] //Jacobian at (0,0)
+T=trace(A1) //Trace of A
+D=det(A1) //Determinant of A
+
+disp("Since, D>0, T<0 , orign is always a fixed point.")
+
+//Now using the arguments given in book and the figure obtained through this example, we conclude :
+
+disp("Middle Fixed Point lies between 0<x*<1, Thus is a Saddle Point.")
+disp("The Thied fixed point is with x*>1, Thus always a stable node.")
+
+xtitle("Nullclines--Showing Intersection of x(dot) and y(dot)","x-Axis ( x )","y-Axis ( y )")
+figure
+a=0.4;
+b=0.8;
+ function xd=linear811(t,x)
+ xd(1)=-a*x(1)+x(2);
+ xd(2)=((x(1)^2)/(1+x(1)^2))-b*x(2);
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[0,0,4,4]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=20; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:20
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear811);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
\ No newline at end of file diff --git a/27/CH8/EX8.1.2/8_1_2.jpg b/27/CH8/EX8.1.2/8_1_2.jpg Binary files differnew file mode 100755 index 000000000..000a67da0 --- /dev/null +++ b/27/CH8/EX8.1.2/8_1_2.jpg diff --git a/27/CH8/EX8.1.2/8_1_2_2.jpg b/27/CH8/EX8.1.2/8_1_2_2.jpg Binary files differnew file mode 100755 index 000000000..80061fd92 --- /dev/null +++ b/27/CH8/EX8.1.2/8_1_2_2.jpg diff --git a/27/CH8/EX8.1.2/Example_8_1_2.sce b/27/CH8/EX8.1.2/Example_8_1_2.sce new file mode 100755 index 000000000..964073c1a --- /dev/null +++ b/27/CH8/EX8.1.2/Example_8_1_2.sce @@ -0,0 +1,73 @@ +clear;
+clear;
+clc;
+close;
+set(gca(),"auto_clear","off") //hold on
+
+//f = x(dot)
+//g = y(dot)
+//Obtain Jacobian as :
+//J=[df/dx df/dy; dg/dx dg/dy]
+//Thus, J=[mew-3*x^2 0; 0 -1]
+mew=2;
+subplot(221)
+for x=-2:0.1:2
+ y1=(mew*x)-x^3;
+ y2=0;
+ plot2d(x,y1,style=-2)
+ plot2d(x,y2,style=-3)
+end
+xtitle("Nullclines--Showing Intersection of x(dot) and y(dot) for mew > 0","x-Axis ( x )","y-Axis ( y )")
+//Stabilities for mew >0
+A1=[mew 0;0 -1] //Jacobian at (0,0)
+T1=trace(A1)
+D1=det(A1)
+A2=[-2*mew 0;0 -1] //Jacobian at (+sqrt(mew),0) and (-sqrt(mew),0)
+T2=trace(A2)
+D2=det(A2)
+Det = (T2^2) - 4*D2
+
+disp("Since D1<0, Thus (0,0) is a Saddle Point.")
+disp("Since T2<0, D2>0 and Det>0, thus (+sqrt(mew),0) and (-sqrt(mew),0) are stable points.")
+subplot(224)
+mew=-2;
+for x=-2:0.1:2
+ y1=(mew*x)-x^3;
+ y2=0;
+ plot2d(x,y1,style=-2)
+ plot2d(x,y2,style=-3)
+end
+xtitle("Nullclines--Showing Intersection of x(dot) and y(dot) for mew < 0","x-Axis ( x )","y-Axis ( y )")
+// Classification of fixed points :
+
+A3=[mew 0;0 -1] //Jacobian at (0,0)
+T3=trace(A3) //Trace of A
+D3=det(A3) //Determinant of A
+Det3=T3^2 - 4*D3
+disp("Since, D>0, T<0 , and Det3>0 orign is a stable fixed point.")
+
+
+//Note Stabilities can be deduced from the figures also as done in previous chapters.
+figure
+mew=-4;
+ function xd=linear812(t,x)
+ xd(1)=mew*x(1)-(x(1)^3);
+ xd(2)=-x(2);
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[-4,-4,4,14]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=10; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:10
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear812);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
diff --git a/27/CH8/EX8.1.3/8_1_3.jpg b/27/CH8/EX8.1.3/8_1_3.jpg Binary files differnew file mode 100755 index 000000000..6ef3e3594 --- /dev/null +++ b/27/CH8/EX8.1.3/8_1_3.jpg diff --git a/27/CH8/EX8.1.3/Example_8_1_3.sce b/27/CH8/EX8.1.3/Example_8_1_3.sce new file mode 100755 index 000000000..bf0bb81aa --- /dev/null +++ b/27/CH8/EX8.1.3/Example_8_1_3.sce @@ -0,0 +1,22 @@ +mew=-2.1;
+ function xd=linear813(t,x)
+ xd(1)=mew*x(1)+x(2)+sin(x(1));
+ xd(2)=x(1)-x(2);
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[-2,-2,2,2]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=20; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:20
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear813);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
\ No newline at end of file diff --git a/27/CH8/EX8.2.1/8_2_1.jpg b/27/CH8/EX8.2.1/8_2_1.jpg Binary files differnew file mode 100755 index 000000000..17de7d5a2 --- /dev/null +++ b/27/CH8/EX8.2.1/8_2_1.jpg diff --git a/27/CH8/EX8.2.1/Example_8_2_1.sce b/27/CH8/EX8.2.1/Example_8_2_1.sce new file mode 100755 index 000000000..df7d9cc11 --- /dev/null +++ b/27/CH8/EX8.2.1/Example_8_2_1.sce @@ -0,0 +1,22 @@ +mew=-0.2;
+ function xd=linear821(t,x)
+ xd(1)=mew*x(1)-x(2)+x(1)*x(2)^2;
+ xd(2)=x(1)+mew*x(2)+x(2)^3;
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[-0.8,-0.8,0.8,0.8]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=35; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:35
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear821);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
\ No newline at end of file diff --git a/27/CH8/EX8.3.1/8_3_1.jpg b/27/CH8/EX8.3.1/8_3_1.jpg Binary files differnew file mode 100755 index 000000000..a05c7b1c9 --- /dev/null +++ b/27/CH8/EX8.3.1/8_3_1.jpg diff --git a/27/CH8/EX8.3.1/Example_8_3_1.sce b/27/CH8/EX8.3.1/Example_8_3_1.sce new file mode 100755 index 000000000..a0926ad64 --- /dev/null +++ b/27/CH8/EX8.3.1/Example_8_3_1.sce @@ -0,0 +1,23 @@ +a=10;
+b=3;
+ function xd=linear831(t,x)
+ xd(1)=a-x(1)-((4*x(1)*x(2))/(1+x(1)^2));
+ xd(2)=(b*x(1))*(1-(x(2)/(1+x(1)^2)));
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[0,3,3,7]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=25; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:25
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear831);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
\ No newline at end of file diff --git a/27/CH8/EX8.3.2/8_3_2.jpg b/27/CH8/EX8.3.2/8_3_2.jpg Binary files differnew file mode 100755 index 000000000..785a61e38 --- /dev/null +++ b/27/CH8/EX8.3.2/8_3_2.jpg diff --git a/27/CH8/EX8.3.2/8_3_2_2.jpg b/27/CH8/EX8.3.2/8_3_2_2.jpg Binary files differnew file mode 100755 index 000000000..c8347f243 --- /dev/null +++ b/27/CH8/EX8.3.2/8_3_2_2.jpg diff --git a/27/CH8/EX8.3.2/Example_8_3_2.sce b/27/CH8/EX8.3.2/Example_8_3_2.sce new file mode 100755 index 000000000..0662cb864 --- /dev/null +++ b/27/CH8/EX8.3.2/Example_8_3_2.sce @@ -0,0 +1,47 @@ +a=10;
+b=4;
+ function xd=linear832(t,x)
+ xd(1)=a-x(1)-((4*x(1)*x(2))/(1+x(1)^2));
+ xd(2)=(b*x(1))*(1-(x(2)/(1+x(1)^2)));
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[0,0,4,10]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=10; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:10
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear832);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
+ figure
+ a=10;
+b=2;
+ function xd=linear8322(t,x)
+ xd(1)=a-x(1)-((4*x(1)*x(2))/(1+x(1)^2));
+ xd(2)=(b*x(1))*(1-(x(2)/(1+x(1)^2)));
+ //x(dot); x(2) means y.
+ //y(dot); x(1) means x.;
+ endfunction
+ bound=[0,0,5,8]; //Bounds of x-axis and y-axis as [xmin ymin xmax ymax], change them according to your needs.
+ nrect=10; //increase it to get more number of curves, i.e. more information will be available.
+ set(gca(),"auto_clear","off") //hold on
+ x=linspace(bound(1),bound(3),nrect);
+ y=linspace(bound(2),bound(4),nrect);
+ x0=[];
+
+ for i=1:10
+ x0=[x(i);y(i)];
+ t0=0;
+ t=0:0.01:3000;
+ xout=ode(x0,t0,t,linear8322);
+ plot2d(xout(1,:),xout(2,:));
+ end
+ xtitle('Phase Portrait','x-axis ( x )','y-axis ( y )')
\ No newline at end of file |