summaryrefslogtreecommitdiff
path: root/2414/CH5/EX5.5/Ex5_5.sce
blob: 95d7bbf62e2e7ba9e16966d4692be812c8365912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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