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.33/Ch6_6_33.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.33/Ch6_6_33.sce')
-rwxr-xr-x | 275/CH6/EX6.6.33/Ch6_6_33.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/275/CH6/EX6.6.33/Ch6_6_33.sce b/275/CH6/EX6.6.33/Ch6_6_33.sce new file mode 100755 index 000000000..504eab1f7 --- /dev/null +++ b/275/CH6/EX6.6.33/Ch6_6_33.sce @@ -0,0 +1,26 @@ +clc
+disp("Example 6.33")
+printf("\n")
+disp("Calculate output voltage if input voltage is 1V")
+printf("Given")
+disp("R1=1K,Rf=100K,V+=15V,V-=-15,Vi=1v")
+Rf=10^5
+R1=10^3
+//supply votage
+Vplus=15
+Vminus=(-15)
+//calculate voltage gain
+Af=(-Rf)/R1
+Vi=1
+// calculate output voltage
+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) then
+ printf("The maximum negative output voltage=%f volt",Vminus)
+//else display Vo
+ else
+ printf("The output voltage=%f volt",Vo)
+end
|