summaryrefslogtreecommitdiff
path: root/2885/CH14/EX14.2/ex14_2.sce
blob: 96e16020a5633d38dfc9301ab9dc124d1687842c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Find the output voltage
clear;
clc;
//soltion
//given

R1=20*10^3;//ohm
Rf=2000*10^3;//ohm
v1=4;//V
v2=3.8;//V
vo=v2*(1+Rf/R1)-(Rf/R1)*v1;
printf("The output voltage= %.1f V",vo);