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 /2915/CH5/EX5.5 | |
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 '2915/CH5/EX5.5')
-rwxr-xr-x | 2915/CH5/EX5.5/5_5.JPG | bin | 0 -> 25025 bytes | |||
-rwxr-xr-x | 2915/CH5/EX5.5/Ex5_5.sce | 25 | ||||
-rwxr-xr-x | 2915/CH5/EX5.5/plot5_5.jpeg | bin | 0 -> 216521 bytes |
3 files changed, 25 insertions, 0 deletions
diff --git a/2915/CH5/EX5.5/5_5.JPG b/2915/CH5/EX5.5/5_5.JPG Binary files differnew file mode 100755 index 000000000..f60d997dc --- /dev/null +++ b/2915/CH5/EX5.5/5_5.JPG diff --git a/2915/CH5/EX5.5/Ex5_5.sce b/2915/CH5/EX5.5/Ex5_5.sce new file mode 100755 index 000000000..ee3773d06 --- /dev/null +++ b/2915/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,25 @@ +//Example 5.5
+//To determine the period of 2 given cosine functions
+clear,clc;
+
+//y=cos(3*x)
+multiple = 3; //multiplicity of angle
+period_cosx = 2*%pi; //period of sin(x) in radians
+required_period = period_cosx / multiple;
+printf('Period of cos(3*x)is %f radians\n',required_period);
+
+//y=cos(0.5*x)
+multiple = 1/2; //multiplicity of angle
+period_cosx = 2*%pi; //period of sin(x) in radians
+required_period = period_cosx / multiple;
+printf('Period of cos(x/2)is %f radians',required_period);
+
+x = linspace(-0,4*%pi,200);
+y = cos(3*x) ;
+z = cos(x/2) ;
+set(gca(),"grid",[4 4]);
+plot(x,y,'r-');
+plot(x,z,'b-');
+xlabel("$0\le x\le 4*pi$","fontsize",4,"color","red");
+title("Example 5.5","color","blue","fontsize",9);
+legend(["y = cos(3x)";"y = cos(x/2)"]);
diff --git a/2915/CH5/EX5.5/plot5_5.jpeg b/2915/CH5/EX5.5/plot5_5.jpeg Binary files differnew file mode 100755 index 000000000..e142fca42 --- /dev/null +++ b/2915/CH5/EX5.5/plot5_5.jpeg |