summaryrefslogtreecommitdiff
path: root/2528/CH4/EX4.14/Ex4_14.sce
blob: 02269dd5de7d913e4568ead003ac7f1866886003 (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
clc;
clear;
close;
//pagec no 116
//Figure 4.22
//Noninverting Amplifier
V1=1;       //In Volt
V2=-0.2;        //In Volt
//to draw graph of V3
step=0.5;
t=0:step:10*%pi;

V3=2*sin(100*t);      //In Volt
R1=20*10^3;    //In ohm
R2=20*10^3;    //In ohm
R3=20*10^3;    //In ohm
Rf=20*10^3;    //In ohm
Ri=5*10^3;    //In ohm
//Vout=(1+(Rf/Ri))*(V1+V2+V3)/3;
Vout=(1+(Rf/Ri))*(V1+V2)/3;     //for DC componet in Vin
Voutac=(1+(Rf/Ri))*(V3)/3;      //for ac componet in Vin
disp("Output Voltage is 3.33 V peak sine wave riding on 1.33 V DC");
plot(Voutac+Vout);
xtitle("Output","t","V")