summaryrefslogtreecommitdiff
path: root/3554/CH17/EX17.3/Ex17_3.sce
blob: 00703a7243cb300c410512eaa27bb4baa9bfc57b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Exa 17.3

clc;
clear all;

// Given data

Vin=5;// Input voltage(Volts)
Rin=2.5;// k Ohms
Rf=1;//k Ohms

// Solution

Iin=Vin/Rin;//Input current(mA)
If=Iin;
Vout=-If*Rf;

printf('The output voltage = %d Volts \n',Vout);