summaryrefslogtreecommitdiff
path: root/2414/CH3/EX3.3/Ex3_3.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2414/CH3/EX3.3/Ex3_3.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 '2414/CH3/EX3.3/Ex3_3.sce')
-rwxr-xr-x2414/CH3/EX3.3/Ex3_3.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/2414/CH3/EX3.3/Ex3_3.sce b/2414/CH3/EX3.3/Ex3_3.sce
new file mode 100755
index 000000000..029625510
--- /dev/null
+++ b/2414/CH3/EX3.3/Ex3_3.sce
@@ -0,0 +1,29 @@
+clc;
+clear all;
+//chapter 3
+//page no 82
+//example 3.3
+A=20; //Volts
+T=1*10^-3; //second
+function Vf=Fourier_transform(f,T,A)
+ if f==0 then
+ Vf=A*T;
+ else
+ Vf=A*T*sin(%pi*f*T)/(%pi*f*T);
+
+ end
+endfunction
+mprintf('(a)Equation for fourier transform is \n V(f)=%.2f*sin(%.3f*pi*f)/(%.3f*pi*f)',A*T,T,T);
+//Part b Calculation
+f=[0 500 1000 1500];
+for i=1:4
+ Vf(i)=Fourier_transform(f(i),T,A)
+end
+//Part c calculation
+RdB=20*log10(Vf ./ .02)
+//Result Table
+mprintf('\nf(Hz) V(f)in V RdB\n')
+for i=1:4
+ mprintf('%5i %f %f \n',f(i),Vf(i),RdB(i))
+end
+//All values are precise