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 /275/CH6/EX6.6.34/Ch6_6_34.sce | |
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 '275/CH6/EX6.6.34/Ch6_6_34.sce')
-rwxr-xr-x | 275/CH6/EX6.6.34/Ch6_6_34.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/275/CH6/EX6.6.34/Ch6_6_34.sce b/275/CH6/EX6.6.34/Ch6_6_34.sce new file mode 100755 index 000000000..210966d8c --- /dev/null +++ b/275/CH6/EX6.6.34/Ch6_6_34.sce @@ -0,0 +1,23 @@ +clc
+disp("Example 6.34")
+printf("\n")
+disp("Calculate output voltage")
+printf("Given")
+disp("R1=2K,Rf=200K,V+=12V,V-=-12,Vi=1.5V")
+Rf=20^4
+R1=2*10^3
+Vplus=12
+Vminus=-12
+Af=1+(Rf/R1)
+Vi=1.5
+Vo=Af*Vi
+//condition to check output votage is greater than Vplus
+if(Vo>Vplus) then
+ printf("The Maximum positive output voltage=%f volt",Vplus)
+//condition to check output voltage is less than Vminus
+elseif(Vo<Vminus)
+ printf("The maximum negative output voltage=%f volt",Vminus)
+ //else display Vo
+else
+ printf("The output voltage=%f volt",Vo)
+end
|