summaryrefslogtreecommitdiff
path: root/61/CH13/EX13.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /61/CH13/EX13.1
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 '61/CH13/EX13.1')
-rwxr-xr-x61/CH13/EX13.1/ex13_1.jpgbin0 -> 44029 bytes
-rwxr-xr-x61/CH13/EX13.1/ex13_1.sce23
2 files changed, 23 insertions, 0 deletions
diff --git a/61/CH13/EX13.1/ex13_1.jpg b/61/CH13/EX13.1/ex13_1.jpg
new file mode 100755
index 000000000..167c0e189
--- /dev/null
+++ b/61/CH13/EX13.1/ex13_1.jpg
Binary files differ
diff --git a/61/CH13/EX13.1/ex13_1.sce b/61/CH13/EX13.1/ex13_1.sce
new file mode 100755
index 000000000..a73ef48d5
--- /dev/null
+++ b/61/CH13/EX13.1/ex13_1.sce
@@ -0,0 +1,23 @@
+//ex13.1
+R2=1*10^3;
+R1=8.2*10^3;
+V=15;
+V_REF=R2*V/(R1+R2);
+disp(V_REF,'V_REF in volts')
+V_max=12; //maximum output level of op-amp
+V_min=-12; //minimum output voltage of comparator
+f=1; //assume frequency of input wave to be 1 hertz
+t=0:0.001:3;
+V_in=5*sin(2*%pi*f.*t)
+clf();
+subplot(121)
+xtitle('Input to comparator-1')
+plot(t,V_in)
+subplot(122)
+xtitle('Output of Comparator-1')
+a=bool2s(V_in>=V_REF)
+b=~a;
+y=V_max*a+V_min*b;
+plot(t,y)
+disp(V_max,'max output voltage in volts')
+disp(V_min,'min output voltage in volts') \ No newline at end of file