From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 135/CH3/EX3.21.a/3_21_a_1.JPG | Bin 0 -> 24575 bytes 135/CH3/EX3.21.a/3_21_a_2.JPG | Bin 0 -> 29858 bytes 135/CH3/EX3.21.a/EX21.sce | 48 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 135/CH3/EX3.21.a/3_21_a_1.JPG create mode 100755 135/CH3/EX3.21.a/3_21_a_2.JPG create mode 100755 135/CH3/EX3.21.a/EX21.sce (limited to '135/CH3/EX3.21.a') diff --git a/135/CH3/EX3.21.a/3_21_a_1.JPG b/135/CH3/EX3.21.a/3_21_a_1.JPG new file mode 100755 index 000000000..edd8cc232 Binary files /dev/null and b/135/CH3/EX3.21.a/3_21_a_1.JPG differ diff --git a/135/CH3/EX3.21.a/3_21_a_2.JPG b/135/CH3/EX3.21.a/3_21_a_2.JPG new file mode 100755 index 000000000..1c9002d81 Binary files /dev/null and b/135/CH3/EX3.21.a/3_21_a_2.JPG differ diff --git a/135/CH3/EX3.21.a/EX21.sce b/135/CH3/EX3.21.a/EX21.sce new file mode 100755 index 000000000..c12f580ba --- /dev/null +++ b/135/CH3/EX3.21.a/EX21.sce @@ -0,0 +1,48 @@ +// Example 3.21: (a) Transfer characteristics and output +// (b) Transfer characteristics and output +clc, clear +Vy=0.6; // in volts +Rf=100; // in ohms +t=[-40:0.001:40]; +vin=40*sin(2*%pi*t/80); // Input voltage in volts + +// Part (a) +// From Fig. 3.49(a) +// Sketching of transfer characteristics +for i=1:length(vin) + if vin(i)<5.6 then + vo(i)=vin(i); // in volts + else + ID=(vin(i)-5.6)/(4.9e3+Rf); // in amperes + vo(i)=vin(i)-ID*4.9e3; // in volts + end +end +plot(vin,vo); +xtitle("Part (a) - Transfer characteristics","vin","vo"); +// Sketching of output +scf(1); +plot(t,vin,"--"); +plot(t,vo); +xtitle("Part (a) - Output voltage and input voltage","ωt","vo,vin"); +legend("vin","vo"); + +// Part (b) +// From Fig. 3.49(b) +// Sketching of transfer characteristics +for i=1:length(vin) + if vin(i)>-0.6 then + vo(i)=vin(i); // in volts + else + ID=(vin(i)+0.6)/(9.9e3+Rf); // in amperes + vo(i)=vin(i)-ID*9.9e3; // in volts + end +end +scf(2); +plot(vin,vo); +xtitle("Part (b) - Transfer characteristics","vin","vo"); +// Sketching of output +scf(3); +plot(t,vin,"--"); +plot(t,vo); +xtitle("Part (b) - Output voltage and input voltage","ωt","vo,vin"); +legend("vin","vo"); \ No newline at end of file -- cgit