summaryrefslogtreecommitdiff
path: root/1757/CH4/EX4.2/EX4_2.sce
blob: ba065d5c0499359be5b8ade9cfb2a6778a455928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 4.2 // Determine the differece voltage and open loop gain of an op-amp
clc ;
clear ;
close ;
V1 = -5 ; // volt  // input voltage
V2 = 5 ; // volt
Vo = 20 ; //volt  // output voltage

// the difference voltage is given by 
 Vd = V2-V1 ;
disp('  The difference voltage is = '+string(Vd)+' V ');

// open loop gain 
A = (Vo/Vd);
disp('  The open loop gain is = '+string(A)+'  ');