summaryrefslogtreecommitdiff
path: root/2672/CH1/EX1.23/Ex1_23.sce
diff options
context:
space:
mode:
Diffstat (limited to '2672/CH1/EX1.23/Ex1_23.sce')
-rwxr-xr-x2672/CH1/EX1.23/Ex1_23.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/2672/CH1/EX1.23/Ex1_23.sce b/2672/CH1/EX1.23/Ex1_23.sce
new file mode 100755
index 000000000..79711ac99
--- /dev/null
+++ b/2672/CH1/EX1.23/Ex1_23.sce
@@ -0,0 +1,28 @@
+//Example 1_23
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+V1=12;//V
+I=2;//A
+R1=2;//ohm
+R2=4;//ohm
+R3=3;//ohm
+R4=3;//ohm
+R5=5;//ohm
+//Converting current source into Voltage source
+V2=I*R3;//V//Converted source
+//writing KVL equation for the loop
+I1=poly(0,'I1');
+eqn=-R1*I1+V1-R2*I1-R3*I1-V2;//KVL equation
+I1=roots(eqn);//A
+VSR=V2+R3*I1;//V
+VRA=0;//V//there is no current
+//Potential of point A with respect to B
+VAB=VSR+VRA;//V
+VOC=VAB;//V
+Req=(R1+R2)*R3/(R1+R2+R3)+R4;//ohm
+//Thevenin equivalent current
+I=VOC/(Req+R5);//A
+disp(I,"Current flowing through 5 ohm Resistance(A)");