summaryrefslogtreecommitdiff
path: root/293/CH2/EX2.7/eg2_7.sce
blob: 3f437fe3a726a5644e9a47cae56577e8623c19cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//a
Ri = 1; 
Rf = 39;
A = 10^5; //open loop gain of the op-amp
G = A/(1 + (A*Ri/(Ri+Rf))); //actual voltage gain of the circuit 
disp("a")
disp(G,"actual voltage of the circuit =")

//b
G1 = 1 + (Rf/Ri); // voltage gain of the circuit with infinite open loop gain
disp("b")
disp(G1,"for ideal case the voltage gain =")

//c
er = ((G1 - G)/G)*100; //percent error 
disp("c")
disp(er,"percent error of the ideal value compared to the actual value=")