diff options
Diffstat (limited to '2414/CH5/EX5.7/Ex5_7.sce')
-rwxr-xr-x | 2414/CH5/EX5.7/Ex5_7.sce | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/2414/CH5/EX5.7/Ex5_7.sce b/2414/CH5/EX5.7/Ex5_7.sce new file mode 100755 index 000000000..8483b7118 --- /dev/null +++ b/2414/CH5/EX5.7/Ex5_7.sce @@ -0,0 +1,37 @@ +clc;
+clear all;
+//page no 158
+//prob no. 5.7
+
+fLO=40; //MHz
+//function for ascending pulse
+function V=pulse_a()
+ V=[]
+ for i=1:.005:2
+ V=[V i]
+ end
+endfunction
+//function for descending pulse
+function V=pulse_d()
+ V=[]
+ for i=2:-.005:1
+ V=[V i]
+ end
+endfunction
+
+//for V2(f)
+f=[0:.01:48+.01]; //x axis
+
+V2=[zeros(0:.01:-8+fLO-.01) pulse_d() zeros(-6+fLO+.01:.01:6+fLO-.01) pulse_a() 0]; //y axis
+clf;
+subplot(211);
+plot2d(f,V2,[5],rect=[0,0,50,2])
+xtitle('Spectral diagram','f,MHz','V2(f)');
+
+//for V3(f)
+f=[0:.01:48+.01]; //x axis
+
+V3=[zeros(0:.01:6+fLO-.01) pulse_a() 0]; //y axis
+subplot(212);
+plot2d(f,V3,[5],rect=[0,0,50,2])
+xtitle('Spectral Diagram','f,MHz','V3(f)');
|