summaryrefslogtreecommitdiff
path: root/2915/CH5/EX5.7
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.7
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.7')
-rwxr-xr-x2915/CH5/EX5.7/5_7.JPGbin0 -> 26564 bytes
-rwxr-xr-x2915/CH5/EX5.7/Ex5_7.sce28
-rwxr-xr-x2915/CH5/EX5.7/plot5_7.jpegbin0 -> 176441 bytes
3 files changed, 28 insertions, 0 deletions
diff --git a/2915/CH5/EX5.7/5_7.JPG b/2915/CH5/EX5.7/5_7.JPG
new file mode 100755
index 000000000..d9c375fc0
--- /dev/null
+++ b/2915/CH5/EX5.7/5_7.JPG
Binary files differ
diff --git a/2915/CH5/EX5.7/Ex5_7.sce b/2915/CH5/EX5.7/Ex5_7.sce
new file mode 100755
index 000000000..23e70a4ea
--- /dev/null
+++ b/2915/CH5/EX5.7/Ex5_7.sce
@@ -0,0 +1,28 @@
+//Example 5.7
+//To find amplitude and period of given composite function
+clear,clc;
+
+x = linspace(0,3,200);
+y1=2 ;//1st part of given function
+amplitude1=y1 ;//amplitude numerically same for constant function
+y2= -3*sin((2*%pi/3)*x); //second part of given function
+amplitude2 = abs(y2/sin((2*%pi/3)*x)) ;//amplitude of part 2
+//Note: adding 2 doesnt change ampitude
+//It just causes the upward shift of graph
+maax =amplitude1 + amplitude2; //altered maximum due to adding of 2
+minn =amplitude1 - amplitude2;//altered minimum due to adding of 2
+amplitude = (maax-minn)/2;//required amplitude
+printf('Amplitude = %f',amplitude);
+
+multiple=2*%pi/3 ;//multiplicity of angle
+period_sinx=2*%pi;//period of sin_x
+period_required = period_sinx/ multiple;
+printf('\nRequired period is %f radians',period_required);
+
+x = linspace(0,3,200);
+y = 2 -3*sin((2*%pi/3)*x)
+set(gca(),"grid",[5 5]);
+plot(x,y);
+xlabel("$0\le x\le 3$","fontsize",4,"color","red");
+ylabel("$y(x)= 2 -3*sin((2*%pi/3)*x)$","fontsize",4,"color","red");
+title("Example 5.7","color","blue","fontsize",9);
diff --git a/2915/CH5/EX5.7/plot5_7.jpeg b/2915/CH5/EX5.7/plot5_7.jpeg
new file mode 100755
index 000000000..ebddb95de
--- /dev/null
+++ b/2915/CH5/EX5.7/plot5_7.jpeg
Binary files differ