diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /61/CH13/EX13.1 | |
download | Scilab-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-x | 61/CH13/EX13.1/ex13_1.jpg | bin | 0 -> 44029 bytes | |||
-rwxr-xr-x | 61/CH13/EX13.1/ex13_1.sce | 23 |
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 Binary files differnew file mode 100755 index 000000000..167c0e189 --- /dev/null +++ b/61/CH13/EX13.1/ex13_1.jpg 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 |