summaryrefslogtreecommitdiff
path: root/2414/CH5/EX5.5/Ex5_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '2414/CH5/EX5.5/Ex5_5.sce')
-rwxr-xr-x2414/CH5/EX5.5/Ex5_5.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/2414/CH5/EX5.5/Ex5_5.sce b/2414/CH5/EX5.5/Ex5_5.sce
new file mode 100755
index 000000000..95d7bbf62
--- /dev/null
+++ b/2414/CH5/EX5.5/Ex5_5.sce
@@ -0,0 +1,27 @@
+clc;
+clear all;
+//page no 152
+//prob no. 5.5
+
+//for input spectrum
+f=[-20:.001:20]; //x axis
+V=[1 zeros(-20+.001:.001:20-.001) 1]; //y axis
+clf;
+subplot(211);
+plot2d(f,V,[5],rect=[-130,0,130,2])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('Input Spectrum','f,kHz','');
+xgrid
+
+//for output spectrum
+f=[-120:.01:120]; //x axis
+V=[1 zeros(-120+.01:.01:-80-.01) 1 zeros(-80+.01:0.01:80-0.01) 1 zeros(80+.01:.01:120-.01) 1]
+subplot(212);
+plot2d(f,V,[5],rect=[-130,0,130,2])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('Output Spectrum','f,kHz','');
+xgrid