summaryrefslogtreecommitdiff
path: root/1850/CH3/EX3.15/exa_3_15.sce
blob: 6d9853e5333d4def80bcd51ba55237e666085d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Exa 3.15
clc;
clear;
close;
// Given data
R_f=20;// in k ohm
R1=10;// in k ohm

// Part (i)  When switch S is off
A_off_non_inv= 1+R_f/R1;
A_off_inv= -R_f/R1;
A_off = A_off_non_inv + A_off_inv;
disp(A_off,"Gain of amplifier circuit when switch S is off");

// Part (ii)  When switch S is on
A_on= -R_f/R1;
disp(A_on,"Gain of amplifier circuit when switch S is on");