diff options
Diffstat (limited to '1592/CH6/EX6.5/Example_6_5.sce')
-rwxr-xr-x | 1592/CH6/EX6.5/Example_6_5.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/1592/CH6/EX6.5/Example_6_5.sce b/1592/CH6/EX6.5/Example_6_5.sce new file mode 100755 index 000000000..d42c30e70 --- /dev/null +++ b/1592/CH6/EX6.5/Example_6_5.sce @@ -0,0 +1,34 @@ +//Scilab Code for Example 6.5 of Signals and systems by
+//P.Ramakrishna Rao//Output of LPF
+clc;
+clear;
+
+for f=-100:100
+ X(f+101)=delta(f+100)+delta(f-100)+3*[delta(f+90)+delta(f-90)];
+end
+f=-100:100;
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+plot2d3(f,X,-2);
+title('Spectrum of x(t)');
+xlabel('--> f');
+fs=150;
+n=-1;f-n*fs
+ for f=-275:275
+ X_delta1(f+276)=delta(f-n*fs+100)+delta(f-n*fs-100)+3*[delta(f-n*fs+90)+delta(f-n*fs-90)];
+ end
+n=n+1;
+ for f=-275:275
+ X_delta2(f+276)=delta(f-n*fs+100)+delta(f-n*fs-100)+3*[delta(f-n*fs+90)+delta(f-n*fs-90)];
+end
+n=n+1;
+ for f=-275:275
+ X_delta3(f+276)=delta(f-n*fs+100)+delta(f-n*fs-100)+3*[delta(f-n*fs+90)+delta(f-n*fs-90)];
+end
+X_delta=X_delta1+X_delta2+X_delta3;
+figure(2);
+f=-275:275;
+plot2d3(f,X_delta,-2);
+title('X_delta(f) at fs=150');
+xlabel('---> f');
|