1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
//Example 4.6.1 Page 110
//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007
//Steven H. Strogatz
clear;
clc;
close;
set(gca(),"auto_clear","off") //hold on
//After mathematical calculations they found:
//<V> = 0 for I<=Ic
//<V> = Ic*R*sqrt((I/Ic)^2 - 1) for I>Ic
//Let V/RIc = Y
//Let I/Ic = X
//so, we have
//Y = 0 for X<=1.
//Y = sqrt((X^2)-1) for X>1.
for X=0:0.05:3
if X<=1 then
Y=0;
plot2d(X,Y,style=-4)
else
Y=sqrt((X^2)-1);
plot2d(X,Y,style=-4)
end
end
for X=0:0.2:3
Y=X;
plot2d(X,Y,style=-2)
end
a=get("current_axes");//get the handle of the newly created axes
a.data_bounds=[0,0;4,4];
xtitle("I-V Curve","X - Axis ( I / Ic )","Y - Axis ( V / RIc )")
//End of Example 4.6.1
|