summaryrefslogtreecommitdiff
path: root/2702/CH1/EX1.5/Ex_1_5.sce
blob: 76129920f8d9a06ea33cb251491e7a39da8b7c7a (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
28
29
30
31
32
33
// Exa 1.5
clc;
clear;
close;
// Given data
Rf= 1;// in Mohm
Rf=Rf*10^6;//in ohm

// Part(a)
V1=1;//in volt
V2=2;//in volt
V3=3;//in volt
R1= 500;// in kohm
R1=R1*10^3;//in ohm
R2= 1;// in Mohm
R2=R2*10^6;//in ohm
R3= 1;// in Mohm
R3=R3*10^6;//in ohm
Vo= -Rf*(V1/R1+V2/R2+V3/R3);// in volt
disp(Vo,"(a) Output voltage in volt is : ")

// Part(b)
V1=-2;//in volt
V2=3;//in volt
V3=1;//in volt
R1= 200;// in kohm
R1=R1*10^3;//in ohm
R2= 500;// in kohm
R2=R2*10^3;//in ohm
R3= 1;// in Mohm
R3=R3*10^6;//in ohm
Vo= -Rf*(V1/R1+V2/R2+V3/R3);// in volt
disp(Vo,"(b) Output voltage in volt is : ")