diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2414/CH3/EX3.7 | |
download | Scilab-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.7')
-rwxr-xr-x | 2414/CH3/EX3.7/Ex3_7.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/2414/CH3/EX3.7/Ex3_7.sce b/2414/CH3/EX3.7/Ex3_7.sce new file mode 100755 index 000000000..9a827eaa8 --- /dev/null +++ b/2414/CH3/EX3.7/Ex3_7.sce @@ -0,0 +1,30 @@ +clc;
+clear all;
+//chapter 3
+//page no 89
+//example 3.7
+A=1; //arbitrary vaule
+T=(1+4)*10^-3; //period in seconds
+tau=1*10^-3; //pulse width in second
+fc=30*10^6; //centre frequency in Hz
+d=tau/T; //duty cycle
+f1=1/T; //Fundamental frequency in Hz
+
+//for plot
+n=[-14:15]; //in Hz
+Vf=[]
+for i=1:length(n)
+ if n(i)==0 then
+ Vf(i*200)=A*d;
+ else
+ Vf(i*200)=A*d*sin(%pi*d*n(i))/(%pi*d*n(i))
+ end
+
+end
+f=-3000:3000-1
+f=f+fc; //Shifting by fc
+f=f*10^-6; //in MHz
+clf;
+plot2d(f,Vf,[5])
+xtitle('Amplitude Spectrum','f,MHz','Vn');
+xgrid
|