summaryrefslogtreecommitdiff
path: root/964/CH19/EX19.2/19_2.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /964/CH19/EX19.2/19_2.sce
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 '964/CH19/EX19.2/19_2.sce')
-rwxr-xr-x964/CH19/EX19.2/19_2.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/964/CH19/EX19.2/19_2.sce b/964/CH19/EX19.2/19_2.sce
new file mode 100755
index 000000000..e89dbbf72
--- /dev/null
+++ b/964/CH19/EX19.2/19_2.sce
@@ -0,0 +1,16 @@
+clc;
+clear;
+a0=0;
+//f(t)=-1 for -T/2 to -T/4
+//f(t)=1 for -T/4 to T/4
+//f(t)=-1 for T/4 to T/2
+//ak=2/T* (integration of f(t)*cos(w0*t) from -T/2 to T/2)
+//ak=2/T*((integration of f(t)*cos(w0*t) from -T/2 to -T/4) + (integration of f(t)*cos(w0*t) from -T/4 to T/4) + (integration of f(t)*cos(w0*t) from T/4 to T/2))
+//Therefore,
+//ak=4/(k*%pi) for k=1,5,9,.....
+//ak=-4/(k*%pi) for k=3,7,11,.....
+//ak=0 for k=even integers
+//similarly we find the b's.
+//all the b's=0
+disp("The fourier approximtion is:")
+disp("4/(%pi)*cos(w)*t) - 4/(3*%pi)*cos(3*(w)*t) + 4/(5*%pi)*cos(5*(w)*t) - 4/(7*%pi)*cos(7*(w)*t) + .....") \ No newline at end of file