From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 27/CH5/EX5.1.1/5_1_1.jpg | Bin 0 -> 99599 bytes 27/CH5/EX5.1.1/5_1_1_2.jpg | Bin 0 -> 52003 bytes 27/CH5/EX5.1.1/Example_5_1_1.sce | 55 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100755 27/CH5/EX5.1.1/5_1_1.jpg create mode 100755 27/CH5/EX5.1.1/5_1_1_2.jpg create mode 100755 27/CH5/EX5.1.1/Example_5_1_1.sce (limited to '27/CH5/EX5.1.1') diff --git a/27/CH5/EX5.1.1/5_1_1.jpg b/27/CH5/EX5.1.1/5_1_1.jpg new file mode 100755 index 000000000..08a339d07 Binary files /dev/null and b/27/CH5/EX5.1.1/5_1_1.jpg differ diff --git a/27/CH5/EX5.1.1/5_1_1_2.jpg b/27/CH5/EX5.1.1/5_1_1_2.jpg new file mode 100755 index 000000000..5b26d1473 Binary files /dev/null and b/27/CH5/EX5.1.1/5_1_1_2.jpg differ diff --git a/27/CH5/EX5.1.1/Example_5_1_1.sce b/27/CH5/EX5.1.1/Example_5_1_1.sce new file mode 100755 index 000000000..fdd657401 --- /dev/null +++ b/27/CH5/EX5.1.1/Example_5_1_1.sce @@ -0,0 +1,55 @@ +clear; +clc; +close; +set(gca(),"auto_clear","off") //hold on + +circle([0 0],4,50) //Circle is drawn with (0,0)as center, radius=4. +circle([0,0],2,50) + +a=get("current_axes"); //get the handle of the newly created axes +a.data_bounds=[-5,-5;5,5]; + +for x = -4:2:4 + for v = -4:2:4 + if(x==0) & (v==0) + plot2d(x,v,style=-4) //if x=0 and v=0 then x(dot)and v(d ot) are also zero, thus Fixed point. + end + if(x==0) & (v>0) + plot2d(x,v,style=-12) + end + if(x==0) & (v<0) + plot2d(x,v,style=-13) + end + if(v==0) & (x>0) + plot2d(x,v,style=-7) + end + if(v==0) & (x<0) + plot2d(x,v,style=-6) + end + end +end + +a=get("current_axes"); //get the handle of the newly created axes +a.data_bounds=[-5,-5;5,5]; +xtitle("Vector Field","X - Axis ( X )","Y - Axis ( V )") + set(gca(),"grid",[2,5]) //Grid on + +figure +function xd=linear511(t,x) + xd(1)=x(2); //x(dot); x(2) means v. + xd(2)=-50*x(1); //v(dot); x(1) means x.; Taking w^2=50; + endfunction + bound=[-4,-4,4,4]; //Bounds of x-axis and y-axis as [xmin ymin xma x ymax], change them according to your needs. + nrect=15; //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:15 + x0=[x(i);y(i)]; + t0=0; + t=0:0.01:3000; + xout=ode(x0,t0,t,linear511); + plot2d(xout(1,:),xout(2,:)); + end -- cgit