summaryrefslogtreecommitdiff
path: root/165/CH14/EX14.2/ex14_2.sce
blob: 77ca1801840ebbb1f7b948cd0098901b912aed9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 14.2
clc;

//Given values of applied potential in V
Va=2;
Vb=1;
Vc=3;
//Given resistence values in ohm
Ra=3000;
Rb=3000;
Rc=3000;
Rf=1000;
//Output of the given summer
Vo=-Rf*(Va/Ra+Vb/Rb+Vc/Rc);
printf('\nOutput Voltage of the op-amp is %.2f ohm\n',Vo)