summaryrefslogtreecommitdiff
path: root/2915/CH5/EX5.4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2915/CH5/EX5.4
downloadScilab-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.4')
-rwxr-xr-x2915/CH5/EX5.4/5_4.JPGbin0 -> 17519 bytes
-rwxr-xr-x2915/CH5/EX5.4/Ex5_4.sce23
-rwxr-xr-x2915/CH5/EX5.4/plot5_4.jpegbin0 -> 207027 bytes
3 files changed, 23 insertions, 0 deletions
diff --git a/2915/CH5/EX5.4/5_4.JPG b/2915/CH5/EX5.4/5_4.JPG
new file mode 100755
index 000000000..f521ee2c6
--- /dev/null
+++ b/2915/CH5/EX5.4/5_4.JPG
Binary files differ
diff --git a/2915/CH5/EX5.4/Ex5_4.sce b/2915/CH5/EX5.4/Ex5_4.sce
new file mode 100755
index 000000000..1dd111e4f
--- /dev/null
+++ b/2915/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,23 @@
+//Example 5.4
+//To determine the period of given sinusoidal function
+clear,clc;
+
+multiple = 2; //multiplicity of angle
+period_sinx = 2*%pi ;//period of sin(x) in radians
+required_period = period_sinx / multiple;
+printf('Required period is %f radians',required_period);
+
+//Note that sin 2x “goes twice as fast” as sin x.
+//While sin x takes a full 2*pi radians to go through an entire cycle
+//sin 2x goes through an entire cycle in just pi radians
+
+x = linspace(-0,2*%pi,100);
+y = sin(2*x) ;
+z = sin(x) ;
+set(gca(),"grid",[4 4]);
+plot(x,y,'r-');
+plot(x,z,'b-');
+xlabel("$0\le x\le 2*pi$","fontsize",4,"color","red");
+ylabel("$y(x)=sin(2x)$","fontsize",4,"color","red");
+title("Example 5.4","color","blue","fontsize",9);
+legend(["sin(2x)";"sin(x)"]);
diff --git a/2915/CH5/EX5.4/plot5_4.jpeg b/2915/CH5/EX5.4/plot5_4.jpeg
new file mode 100755
index 000000000..ccc247e58
--- /dev/null
+++ b/2915/CH5/EX5.4/plot5_4.jpeg
Binary files differ