summaryrefslogtreecommitdiff
path: root/275/CH6/EX6.6.26/Ch6_6_26.sce
blob: 90e4883651dd4254047417bbad6673974bc41829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
disp("Example 6.26")
printf("\n")
disp("calculate the output voltage for a given input voltages")
printf("given")
disp("input voltages=0.2,0.5sin314t,-0.4")
Rf=200*10^3
R1=20*10^3
Af=(-Rf)/R1// calculate open loop gain
t=%pi/(2*314)//intialise t value
Vi=[0.2,0.5*(sin(314*t)),-0.4]
Vo=Af*Vi//calculate output voltage
printf("Output voltages are=\n%f volt,\n%f volt,\n%f volt",Vo)