summaryrefslogtreecommitdiff
path: root/887/CH11/EX11.9/11_9.sce
blob: 67d3083dd6cf4a84e2ef011a1ccb9c0096a80c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc
//ex11.9
t=[0:0.000001:0.002];
V_i=3*cos(2000*%pi*t)-2*cos(6000*%pi*t);
//let A_1000 and A_3000 be the gains
A_1000_peak=10;
A_1000_phi=0;
A_3000_peak=2.5;
A_3000_phi=0;
//multiplying by respective gains
V_o=A_1000_peak*3*cos(2000*%pi*t+A_1000_phi)-A_3000_peak*2*cos(6000*%pi*t+A_3000_phi);
subplot(121)
xtitle('Input-voltage vs time','time in ms','Internal-voltage in volts')
plot(t*10^3,V_i)
subplot(122)
xtitle('Output-voltage vs time','time in ms','Output voltage in volts')
plot(t*10^3,V_o)