blob: be543ddaef0d841a89e3419c444bf4fc2db11ea1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Chapter3
// Page.No-99, Figure.No-3.16
// Example_3_6_b
// Output voltage of the Op-amp
// Given
clear;clc;
R1=680;RF=6800 // Both are in ohms
vx=-1.5;vy=-2; // Both input voltages are in volts
AD=1+RF/R1; // Voltage gain
vxy=vx-vy;
vo=AD*vxy; // Output voltage
printf("\n Output voltage is vo = %.1f V \n",vo) // Result
|