summaryrefslogtreecommitdiff
path: root/2915/CH5/EX5.9
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.9
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.9')
-rwxr-xr-x2915/CH5/EX5.9/5_9.JPGbin0 -> 35660 bytes
-rwxr-xr-x2915/CH5/EX5.9/Ex5_9.sce31
-rwxr-xr-x2915/CH5/EX5.9/plot5_9.jpegbin0 -> 224840 bytes
3 files changed, 31 insertions, 0 deletions
diff --git a/2915/CH5/EX5.9/5_9.JPG b/2915/CH5/EX5.9/5_9.JPG
new file mode 100755
index 000000000..6320120aa
--- /dev/null
+++ b/2915/CH5/EX5.9/5_9.JPG
Binary files differ
diff --git a/2915/CH5/EX5.9/Ex5_9.sce b/2915/CH5/EX5.9/Ex5_9.sce
new file mode 100755
index 000000000..85f449dc5
--- /dev/null
+++ b/2915/CH5/EX5.9/Ex5_9.sce
@@ -0,0 +1,31 @@
+//Example 5.9
+//To find the amplitude and period of given function
+clear,clc;
+
+//amplitude
+x = linspace(-0,4*%pi,200);
+y1=3*sin(x); //1st part of given function
+amplitude1=y1/sin(x); //amplitude of part 1
+y2= 4*cos(x); //second part of given function
+amplitude2 =y2/(cos(x)); //amplitude of part 2
+
+//given function is a composition of 2 functions
+//Using trigonometric identities, merge them into 1
+//the amplitude of resultant is the required amplitude
+//In this case the merged function can be sine or cos
+//merging sine and cos into sine,
+amplitude = sqrt(amplitude1^2 + amplitude2^2);
+printf('Amplitude = %f',amplitude);
+
+//period
+period_cosx=2*%pi ;//period of cos(x) is 2 pi
+period_sinx=2*%pi ;//period of sin(x) is 2 pi
+locm = 2*%pi; //lcm of period_sinx and period_cosx
+printf('\nRequired period is %f radians',locm);
+x = linspace(0,4*%pi,200);
+y = 3*sin(x) +4*cos(x);
+set(gca(),"grid",[5 5]);
+plot(x,y,'r');
+xlabel("$0\le x\le 4*pi$","fontsize",4,"color","red");
+ylabel("$y(x)= 3*sin(x) +4*cos(x)$","fontsize",4,"color","red");
+title("Example 5.9","color","red","fontsize",9);
diff --git a/2915/CH5/EX5.9/plot5_9.jpeg b/2915/CH5/EX5.9/plot5_9.jpeg
new file mode 100755
index 000000000..b8b10e873
--- /dev/null
+++ b/2915/CH5/EX5.9/plot5_9.jpeg
Binary files differ