summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.37
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH1/EX1.37
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1445/CH1/EX1.37')
-rw-r--r--1445/CH1/EX1.37/Ex1_37.sce9
1 files changed, 5 insertions, 4 deletions
diff --git a/1445/CH1/EX1.37/Ex1_37.sce b/1445/CH1/EX1.37/Ex1_37.sce
index b7eb9f63a..fd324d1c1 100644
--- a/1445/CH1/EX1.37/Ex1_37.sce
+++ b/1445/CH1/EX1.37/Ex1_37.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 37
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 37");
@@ -29,7 +30,7 @@ req2=req1+r4;
req3=(req2*r6)/(req2+r6);
rth=req3+r2;
vab1=(vth*r3)/(rth+r3);
-disp(sprintf("By Thevenin Theorem, the value of Vab is %.2f V",vab1));
+disp(sprintf("By Thevenins Theorem, the value of Vab is %f V",vab1));
//solution (ii): using Norton's Theorem
//(13)v1+(-7)v2=270.........eq (1) //applying nodal analysis at node 1
@@ -44,11 +45,11 @@ req2=req1+r4;
req3=(req2*r6)/(req2+r6);
rN=req3+r2;
if(v1>v2) then
-In=(v1-v2)/r2;
+IN=(v1-v2)/r2;
else
IN=(v2-v1)/r2;
end;
vab2=(r3*IN)*(rN/(rth+r3));
-disp(sprintf("By Norton Theorem, the value of Vab is %.2f V",vab2));
+disp(sprintf("By Nortons Theorem, the value of Vab is %f V",vab2));
-//END
+//END \ No newline at end of file