summaryrefslogtreecommitdiff
path: root/135/CH3/EX3.21.a
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /135/CH3/EX3.21.a
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '135/CH3/EX3.21.a')
-rwxr-xr-x135/CH3/EX3.21.a/3_21_a_1.JPGbin0 -> 24575 bytes
-rwxr-xr-x135/CH3/EX3.21.a/3_21_a_2.JPGbin0 -> 29858 bytes
-rwxr-xr-x135/CH3/EX3.21.a/EX21.sce48
3 files changed, 48 insertions, 0 deletions
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
--- /dev/null
+++ b/135/CH3/EX3.21.a/3_21_a_1.JPG
Binary files 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
--- /dev/null
+++ b/135/CH3/EX3.21.a/3_21_a_2.JPG
Binary files 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