summaryrefslogtreecommitdiff
path: root/27/CH2/EX2.4.1/Example_2_4_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '27/CH2/EX2.4.1/Example_2_4_1.sce')
-rwxr-xr-x27/CH2/EX2.4.1/Example_2_4_1.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/27/CH2/EX2.4.1/Example_2_4_1.sce b/27/CH2/EX2.4.1/Example_2_4_1.sce
new file mode 100755
index 000000000..848f8bf1f
--- /dev/null
+++ b/27/CH2/EX2.4.1/Example_2_4_1.sce
@@ -0,0 +1,26 @@
+//Example 2.4.1 Page 25
+//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007
+//Steven H. Strogatz
+
+clear;
+clc;
+close;
+set(gca(),"auto_clear","off") //hold on
+
+
+disp("When x(double dot) < 0 then => Fixed Point is Stable.")
+disp("When x(double dot) > 0 then => Fixed Point is Unstable.")
+
+//x(dot) = f(x) = sin(x) =0 => x* = k*pi
+
+for k= -5*(%pi):%pi:5*(%pi)
+ f1 = cos(k)
+ plot2d(k,f1,style=-4)
+end
+
+for x= -5*(%pi):0.2:5*(%pi)
+ f = sin(x);
+ plot2d(x,f,style=-2)
+end
+set(gca(),"grid",[2,5])
+xtitle("f(dot) (x*) and sin (x)","x-Axis","y-Axis (Sin(x))") \ No newline at end of file