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/CH3 | |
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/CH3')
-rwxr-xr-x | 27/CH3/EX3.1.1/3_1_1.jpg | bin | 0 -> 87900 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.1.1/Example_3_1_1.sce | 62 | ||||
-rwxr-xr-x | 27/CH3/EX3.1.2/3_1_2.jpg | bin | 0 -> 172354 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.1.2/Example_3_1_2.sce | 32 | ||||
-rwxr-xr-x | 27/CH3/EX3.2.1/3_2_1.jpg | bin | 0 -> 78696 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.2.1/Example_3_2_1.sce | 52 | ||||
-rwxr-xr-x | 27/CH3/EX3.2.2/3_2_2.jpg | bin | 0 -> 67029 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.2.2/Example_3_2_2.sce | 47 | ||||
-rwxr-xr-x | 27/CH3/EX3.4.1/3_4_1.jpg | bin | 0 -> 136567 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.4.1/3_4_1_2.jpg | bin | 0 -> 60015 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.4.1/Example_3_4_1.sce | 48 | ||||
-rwxr-xr-x | 27/CH3/EX3.4.2/3_4_2.jpg | bin | 0 -> 138094 bytes | |||
-rwxr-xr-x | 27/CH3/EX3.4.2/Example_3_4_2.sce | 20 |
13 files changed, 261 insertions, 0 deletions
diff --git a/27/CH3/EX3.1.1/3_1_1.jpg b/27/CH3/EX3.1.1/3_1_1.jpg Binary files differnew file mode 100755 index 000000000..12c53552a --- /dev/null +++ b/27/CH3/EX3.1.1/3_1_1.jpg diff --git a/27/CH3/EX3.1.1/Example_3_1_1.sce b/27/CH3/EX3.1.1/Example_3_1_1.sce new file mode 100755 index 000000000..a46e0fb3a --- /dev/null +++ b/27/CH3/EX3.1.1/Example_3_1_1.sce @@ -0,0 +1,62 @@ +// Example 3.1.1, Page = 47
+// Non-Linear Dynamics and Chaos, First Indian Edition
+//Steven H. Strogatz
+// x(dot)=f(x)=r-(x^2)
+// Notation: x1,x2,x3........ are the fixed point solutions
+// since x* is an error, because of multiplication operator.
+
+clear;
+clc;
+close;
+
+for r=-1:0.1:+1 //Varying value of parameter "r" so as to obtain bifurcation diagram.
+
+ x1 = +(sqrt(r)); //First Fixed Point.
+ x2 = -(sqrt(r)); //Second Fixed Point.
+ f1 = -2*x1; //f'(x) at x1.
+ f2 = -2*x2; //f'(x) at x2.
+
+ //x(double dot) = f'(x) = -2*x.
+ set(gca(),"auto_clear","off") //hold on
+ set(gca(),"grid",[2,5])
+ if (r<0) then
+ y = 0; //just to draw y=0 line for r<0, as no solution
+ disp(r)
+ disp("No fixed points.")
+ plot2d(r,y,style=-2)
+
+ else
+ set(gca(),"auto_clear","off")
+ if(f1>0) //unstable solutions
+ disp(r,x1)
+ disp("unstable solutions")
+ plot2d(r,x1,style=-1)
+
+ end
+ if(f1<0) //Stable solutions
+ disp(r,x1)
+ disp("stable solutions")
+ plot2d(r,x1,style=-2)
+
+ end
+
+ set(gca(),"auto_clear","off")
+
+ if(f2>0) //unstable solutions
+ disp(r,x2)
+ disp("unstable solutions")
+ plot2d(r,x2,style=-1)
+
+ end
+ if(f2<0) //stable solutions
+ disp(r,x2)
+ disp("stable solutions")
+ plot2d(r,x2,style=-2)
+
+ end
+ xtitle("Bifurcation Diagram","r-parameter","x*-fix points")
+ end
+end
+disp("Clearly from the graph x=0 is bifurcation point.")
+set(gca(),"auto_clear","on") //hold off
+//End of Example
diff --git a/27/CH3/EX3.1.2/3_1_2.jpg b/27/CH3/EX3.1.2/3_1_2.jpg Binary files differnew file mode 100755 index 000000000..c90f670a2 --- /dev/null +++ b/27/CH3/EX3.1.2/3_1_2.jpg diff --git a/27/CH3/EX3.1.2/Example_3_1_2.sce b/27/CH3/EX3.1.2/Example_3_1_2.sce new file mode 100755 index 000000000..7d5def513 --- /dev/null +++ b/27/CH3/EX3.1.2/Example_3_1_2.sce @@ -0,0 +1,32 @@ +// Example 3.1.2 Pg 47
+//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007
+//Steven H.Strogatz
+
+clear;
+clc;
+close;
+set(gca(),"auto_clear","on") //hold off
+
+for(r=0:1:3) //Varying value of parameter "r" to see number of fixed point solutions.
+ x=-2:0.1:3;
+ set(gca(),"grid",[2,5])
+ set(gca(),"auto_clear","off") //hold on
+ plot2d(x,exp(-x),style=-4)
+ plot2d(x,r-x,style=-2)
+ figure //to get new graphics window
+ set(gca(),"grid",[2,5])
+ xtitle("Graph showing Number of Fix Points","X-Axis","Y-Axis")
+end
+
+ disp("From the graph we get intersection point")
+ disp("And hence we got our FIXED POINT SOLUTION.")
+ disp("Clearly from graph we get stable solution when line is below exp(-x) graph.")
+ disp("Unstable solution when line is above exp(-x) graph.")
+ disp("From graph we infer that :")
+ disp("1. No Fixed Points for r<1")
+ disp("2. One Fixed Point when r=1.")
+ disp("3. Two Fixed Points for r>1.")
+ disp("hence Bifurcation Point is cleraly, r(c)=1")
+set(gca(),"auto_clear","on")
+//End of Example
+
\ No newline at end of file diff --git a/27/CH3/EX3.2.1/3_2_1.jpg b/27/CH3/EX3.2.1/3_2_1.jpg Binary files differnew file mode 100755 index 000000000..745e6dbc5 --- /dev/null +++ b/27/CH3/EX3.2.1/3_2_1.jpg diff --git a/27/CH3/EX3.2.1/Example_3_2_1.sce b/27/CH3/EX3.2.1/Example_3_2_1.sce new file mode 100755 index 000000000..496a07b75 --- /dev/null +++ b/27/CH3/EX3.2.1/Example_3_2_1.sce @@ -0,0 +1,52 @@ +//Example 3.2.1 Page 51
+//Non-Linear Dynamics and Chaos, First Indian Edition, Print-2007
+//Steven H. Strogatz
+
+clear;
+clc;
+close;
+
+// General INTRODUCTION
+disp("To show their is Transcritical Bifurcation show :")
+disp("1. Their are always two fixed points ,")
+disp("And they change their Stability around Bifurcation Point.")
+disp("2. Hence, the nature of given equation should be Quadratic.")
+disp("To show this use Taylor Expansion.")
+// END INTRODUCTION
+
+//By Taylor Expansion of given x(dot) and neglecting order(x^3) and higher order terms we get ----
+//x(dot) = (1-ab)x + (1/2)(ab*b)x^2.------Let x(dot) = f(x)
+
+//Stability Analysis : Put x(dot)=f(x)=0
+for(a=5) //Fixing one of the two parameters (i.e "a" And "b")
+ for(b=-4:0.15:3) //Varying another parameter to plot Bifurcation Diagram.
+
+ x1 = 0; //First Fixed Point
+ x2 = 2*(a*b -1)/(a*b*b); //Second Fixed Point
+ f1 = (1-a*b); //f'(x) at x1
+ f2 = -(1-a*b); //f'(x) at x2
+
+ //x(double dot)= f'(x) = (1-ab) + a(b^2)x
+
+ set(gca(),"auto_clear","off") //For "hold on" to plot points.
+ set(gca(),"grid",[2,5]) // To set axis
+ if(f1>0) //Unstable fixed point.
+ plot2d(1-a*b,x1,style=-2)
+ end
+ if(f1<0) //Stable Fixed point.
+ plot2d(1-a*b,x1,style=-3)
+ end
+ if(f2>0) //Unstable Fixed Point.
+ plot2d(1-a*b,x2,style=-2)
+ end
+ if(f2<0) //Stable Fixed Point.
+ plot2d(1-a*b,x2,style=-3)
+ end
+ xtitle("Bifurcation Diagram","x-axis (1-a*b)","x*-fix points")
+ end
+end
+disp("From Graph it is clearly visible that the two fixed points changes stability around point ab=1 ")
+
+set(gca(),"auto_clear","on") //for hold off
+
+//end of Example
\ No newline at end of file diff --git a/27/CH3/EX3.2.2/3_2_2.jpg b/27/CH3/EX3.2.2/3_2_2.jpg Binary files differnew file mode 100755 index 000000000..eaaf252f4 --- /dev/null +++ b/27/CH3/EX3.2.2/3_2_2.jpg diff --git a/27/CH3/EX3.2.2/Example_3_2_2.sce b/27/CH3/EX3.2.2/Example_3_2_2.sce new file mode 100755 index 000000000..2caacce8a --- /dev/null +++ b/27/CH3/EX3.2.2/Example_3_2_2.sce @@ -0,0 +1,47 @@ +//Example 3.2.2 Page 52
+//Non-Linear Dynamics and Chaos, First Indian Edition, Print-2007
+//Steven H. Strogatz
+
+clear;
+clc;
+close;
+
+//General INTRODUCTION
+disp("To show their is Transcritical Bifurcation show :")
+disp("1. Their are always two fixed points ,")
+disp("And they change their Stability around Bifurcation Point.")
+disp("2. Hence, the nature of given equation should be Quadratic.")
+disp("To show this use Taylor Expansion.")
+// End INTRODUCTION
+
+// u(dot) = (r+1)u - (1/2)r(u^2) + O(u^3)
+// u(dot) = (r+1)u - (1/2)r(u^2) + ZERO -----neglecting higher order terms
+// Let u(dot) = f(u)
+
+for r=-4:0.15:3 //Varying Parmater "r" to obtain Bifurcation Diagram
+ u1 = 0; //First Fixed Point.
+ u2 = 2*(r+1)/r; //Second Fixed Point.
+ f1 = (r+1); //f'(u) at u1
+ f2 = -(r+1); //f'(u) at u2
+ set(gca(),"auto_clear","off") //hold on
+ set(gca(),"grid",[2,5])
+
+ //u(double dot) = f'(u) = (r+1) - r*u
+
+ if (f1>0) then //Unstable Fixed Point.
+ plot2d(r+1,u1,style=-2)
+ end
+ if (f1<0) then //Stable Fixed Point.
+ plot2d(r+1,u1,style=-3)
+ end
+ if (f2>0) then //Unstable Fixed Point.
+ plot2d(r+1,u2,style=-2)
+ end
+ if (f2<0) then //Stable Fixed Point.
+ plot2d(r+1,u2,style=-3)
+ end
+ xtitle("Bifurcation Diagram","x-Axis -(r+1)","u*-fix points")
+end
+set(gca(),"auto_clear","on") //hold off
+disp("Clearly from the Bifurcation Diagram we see that r=-1 is the bifurcation point.")
+//end of Example
\ No newline at end of file diff --git a/27/CH3/EX3.4.1/3_4_1.jpg b/27/CH3/EX3.4.1/3_4_1.jpg Binary files differnew file mode 100755 index 000000000..4865ddfa1 --- /dev/null +++ b/27/CH3/EX3.4.1/3_4_1.jpg diff --git a/27/CH3/EX3.4.1/3_4_1_2.jpg b/27/CH3/EX3.4.1/3_4_1_2.jpg Binary files differnew file mode 100755 index 000000000..a2c8d7ae7 --- /dev/null +++ b/27/CH3/EX3.4.1/3_4_1_2.jpg diff --git a/27/CH3/EX3.4.1/Example_3_4_1.sce b/27/CH3/EX3.4.1/Example_3_4_1.sce new file mode 100755 index 000000000..c33a7b323 --- /dev/null +++ b/27/CH3/EX3.4.1/Example_3_4_1.sce @@ -0,0 +1,48 @@ +//Example 3.4.1 Page 57
+//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007
+//Steven H. Strogatz
+
+clear;
+clc;
+close;
+set(gca(),"auto_clear","on") //hold off
+
+for (B=0.5:0.5:2) //Capital "B" is denoting Beta.
+ x=-3:0.1:3;
+ y=x; //To plot x=y line.
+
+ figure;
+ set(gca(),"auto_clear","off") //hold on
+ set(gca(),"grid",[2,5])
+ plot2d(x,y,style=-4)
+ plot2d(x,B*tanh(x),style=-1)
+ xtitle("Intersection For different Beta values","x-Axis","y-Axis")
+
+
+end
+disp("From graph following points are clear:")
+disp("1. For B<1, only orign is the fixed point.")
+disp("2. For B>1, their are two new fixed points.")
+
+//Stability
+figure
+set(gca(),"grid",[2,5])
+for(x1 = -3:0.5:3)
+ if(x1~=0)
+ B = x1/tanh(x1);
+ plot2d(B,x1,style=-4)
+end
+
+for(B=0:0.1:3);
+ x1 = 0;
+if(B<1)
+ plot2d(B,x1,style=-4) //Stable
+else
+ plot2d(B,x1,style=-2) //Unstable
+end
+xtitle("Bifurcation Diagram","Beta Values-Parameter","x*-Fix Points")
+end
+end
+set(gca(),"auto_clear","on")
+//If B<1 then only one fixed point.
+//end of Example.
\ No newline at end of file diff --git a/27/CH3/EX3.4.2/3_4_2.jpg b/27/CH3/EX3.4.2/3_4_2.jpg Binary files differnew file mode 100755 index 000000000..2b45549e4 --- /dev/null +++ b/27/CH3/EX3.4.2/3_4_2.jpg diff --git a/27/CH3/EX3.4.2/Example_3_4_2.sce b/27/CH3/EX3.4.2/Example_3_4_2.sce new file mode 100755 index 000000000..380ede04f --- /dev/null +++ b/27/CH3/EX3.4.2/Example_3_4_2.sce @@ -0,0 +1,20 @@ +//Example 3.4.2 Page 58
+//Non-Linear Dynamics and Chaos First Indian Edition Print 2007
+//Steven H.Strogatz
+clear;
+clc;
+close;
+set(gca(),"auto_clear","on") //hold off
+
+for(r=-1:0.5:1)
+ x = -3:0.1:3;
+ V = -0.5*r*(x^2)+0.25*(x^4);
+ set(gca(),"auto_clear","off") //hold on
+ xtitle("Potential Diagram","X-Axis","Y-Axis")
+ plot2d(x,V,style=-4)
+ figure
+ set(gca(),"grid",[2,5])
+
+end
+set(gca(),"auto_clear","on")
+//End of Example
\ No newline at end of file |