From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 275/CH6/EX6.6.34/Ch6_6_34.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 275/CH6/EX6.6.34/Ch6_6_34.sce (limited to '275/CH6/EX6.6.34/Ch6_6_34.sce') 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