diff options
Diffstat (limited to '2672/CH1')
47 files changed, 1089 insertions, 0 deletions
diff --git a/2672/CH1/EX1.1/Ex1_1.sce b/2672/CH1/EX1.1/Ex1_1.sce new file mode 100755 index 000000000..1e54fb568 --- /dev/null +++ b/2672/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,13 @@ +//Example 1_1
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+Vs=20;//V
+Rse=5;//ohm(Internal Resistance)
+//Source Conversion
+Is=Vs/Rse;//A
+Rsh=Rse;//ohm(same)
+disp(Is,"Equivalent current source(A)");
+disp(Rsh,"Internal resistance in parallel(ohm)")
diff --git a/2672/CH1/EX1.10/Ex1_10.sce b/2672/CH1/EX1.10/Ex1_10.sce new file mode 100755 index 000000000..a678a579d --- /dev/null +++ b/2672/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,21 @@ +//Example 1_10
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+VD=10;//V
+VE=6;//V
+R1=3;R2=4;R3=14;R4=8;R5=12;//ohm
+//Ohm's current law
+//I1=(VD-VB)/R1;I2=VB/R4;I3=(VK-VC)/R2;//A
+//Where VK=VB-3;//V
+//KCL at Node B : 17*VB-6*VC=98
+//KCL at Node C : 21*VB-34*VC=27
+A=[17 -6;21 -34];//Coefficient Matrix
+B=[98;27];//Coefficient Matrix
+X=A^-1*B;//solution
+VB=X(1);//V
+VC=X(2);//V
+I2=VB/R4;//A
+disp(I2,"Current through the 8 ohm resistor(A) : ");
diff --git a/2672/CH1/EX1.11/Ex1_11.sce b/2672/CH1/EX1.11/Ex1_11.sce new file mode 100755 index 000000000..ef7d12324 --- /dev/null +++ b/2672/CH1/EX1.11/Ex1_11.sce @@ -0,0 +1,17 @@ +//Example 1_11
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+VA=24;//V
+VC=12;//V
+R1=6;R2=6;R3=6;//ohm
+//Considering VA only, making VC short circuit
+I=VA/(R1+R2*R3/(R2+R3));//A//from source VA
+I1A=I*R2/(R1+R2);//A//through BD from VA only
+//Considering VC only, making VA short circuit
+I=VC/(R3+R1*R2/(R1+R2));//A//from source VC
+I1C=I*R2/(R1+R2);//A//through BD from VA only
+IBD=I1A+I1C;//A
+disp(IBD,"Current IBD in the Circuit(A) : ");
diff --git a/2672/CH1/EX1.12/Ex1_12.sce b/2672/CH1/EX1.12/Ex1_12.sce new file mode 100755 index 000000000..916f453f8 --- /dev/null +++ b/2672/CH1/EX1.12/Ex1_12.sce @@ -0,0 +1,17 @@ +//Example 1_12
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+VA=75;//V
+VB=64;//V
+R1=5;R2=5;R3=4;R4=20;R5=12;//ohm
+//Considering VA only, making VB short circuit
+I=VA/(R1+(R3*R5/(R3+R5)+R2)*R4/(R4+R3*R5/(R3+R5)+R2));//A//from source VA
+I1A=I*R4/(R4+R2+R3*R5/(R3+R5));//A//through AB from VA only
+//Considering VB only, making VA short circuit
+I=VB/(R3+(R1*R4/(R1+R4)+R2)*R5/(R5+R1*R4/(R1+R4)+R2));//A//from source VB
+I1B=I*R5/(R5+(R1*R4/(R1+R4)+R2));//A//through AB from VB only
+IAB=I1A-I1B;//A//total current through R2=5 ohm
+disp(IAB,"Current I in the Circuit is equal to IAB(A) : ");
diff --git a/2672/CH1/EX1.13/Ex1_13.sce b/2672/CH1/EX1.13/Ex1_13.sce new file mode 100755 index 000000000..0004cff89 --- /dev/null +++ b/2672/CH1/EX1.13/Ex1_13.sce @@ -0,0 +1,15 @@ +//Example 1_13
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=20;//V
+I=2;//V
+R1=2;R2=4;R3=8;//ohm
+//Considering current source only, making Voltage source short circuit
+I1=I*R1/(R1+R3);//A//through B to A
+//Considering Voltage source only, making current source open circuit
+I2=V/(R1+R3);//A//through A to B
+IAB=I2-I1;//A//total current through R2=5 ohm
+disp(IAB,"Current through 8ohm resistor(A) : ");
diff --git a/2672/CH1/EX1.14/Ex1_14.sce b/2672/CH1/EX1.14/Ex1_14.sce new file mode 100755 index 000000000..e247923e1 --- /dev/null +++ b/2672/CH1/EX1.14/Ex1_14.sce @@ -0,0 +1,26 @@ +//Example 1_14
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=40;//V
+V2=44;//V
+R1=2;//ohm
+R2=4;//ohm
+R3=6;//ohm
+I1=poly(0,'I1');
+I2=poly(0,'I2');
+//From Mesh ABEFA//eq1=V1-R1*I1+R2*I2-V2;
+//-R1*I1+R2*I2=V2-V1;//eqn(1)
+//From Mesh BCDED//eq2=-R2*I2-R3*(I1+I2)+V2;
+//R3*I1+(R2+R3)*I2=V2;//eqn(2)
+A=[-R1 R2;R3 (R2+R3)];//coefficient matrix
+B=[V2-V1;V2];//coefficient matrix
+X=A^-1*B;//
+I1=X(1);//A
+disp(I1,"Current I1(A)");
+I2=X(2);//A
+disp(I2,"Current I2(A)");
+I=I1+I2;//A
+disp(I,"Total Current I(A)");
diff --git a/2672/CH1/EX1.15/Ex1_15.sce b/2672/CH1/EX1.15/Ex1_15.sce new file mode 100755 index 000000000..e4ce063aa --- /dev/null +++ b/2672/CH1/EX1.15/Ex1_15.sce @@ -0,0 +1,20 @@ +//Example 1_15
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+V=2;//V
+R1=1;//ohm
+R2=2;//ohm
+R3=3;//ohm
+R4=2;//ohm
+R5=4;//ohm
+//Mesh ABDA: -I1-R5*I3+R4*I2=0
+//Mesh BCDB: -R2*(I1-I3)+R3*(I2+I3)+R5*I3=0
+//Mesh ABCA: -I1-R2*(I1-I3)+V=0
+A=[-R1 R4 -R5;-R2 R3 R3+R2+R5;-R3 0 R2];//coefficient matrix
+B=[0;0;-V];//coefficient matrix
+X=A^-1*B;//
+I3=X(3);//A
+disp(I3,"Current through galvanometer, I3(A)");
diff --git a/2672/CH1/EX1.16/Ex1_16.sce b/2672/CH1/EX1.16/Ex1_16.sce new file mode 100755 index 000000000..1408d2631 --- /dev/null +++ b/2672/CH1/EX1.16/Ex1_16.sce @@ -0,0 +1,25 @@ +//Example 1_16
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+R1=4;//ohm
+R2=6;//ohm
+R3=8;//ohm
+//I1=I2+IS//eqn(1)
+//I2+I3=V1/4//eqn(2)
+Vo=16;//V
+//VAC+VAB=Vo : V1+R1*I2=Vo///eqn(3)
+//I1=V1/R2;//eqn(4)
+I3=Vo/R3;//A
+//V1/4-I2=I3//eqn(5)
+//solving eqn(3) & eqn(5)
+A=[1 R1;1/4 -1];
+B=[Vo;I3];
+X=A^-1*B;
+V1=X(1);//V
+I2=X(2);//A
+I1=V1/6;//A
+Is=I1-I2;//A
+disp(Is,"Current Is(A)");
diff --git a/2672/CH1/EX1.17/Ex1_17.sce b/2672/CH1/EX1.17/Ex1_17.sce new file mode 100755 index 000000000..76b3381f5 --- /dev/null +++ b/2672/CH1/EX1.17/Ex1_17.sce @@ -0,0 +1,22 @@ +//Example 1_17
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=12;//V
+V2=10;//V
+R1=2;//ohm
+R2=1;//ohm
+R3=10;//ohm
+//Node A : I1=(V1-VA)/2
+//Node B : I2=(V2-VB)/2
+//IL=VB/R3;//A
+//IL=I1+I2
+VA=10;VB=10//V
+I1=(V1-VA)/2;//A//from Node A
+I2=(V2-VB)/2;//A//from Node B
+IL=VB/R3;//A
+disp(I1,"Current by Battery A, IA(A)");
+disp(I2,"Current by Battery B, IA(A)");
+disp(IL,"Load Current(A)");
diff --git a/2672/CH1/EX1.18/Ex1_18.sce b/2672/CH1/EX1.18/Ex1_18.sce new file mode 100755 index 000000000..682906ac0 --- /dev/null +++ b/2672/CH1/EX1.18/Ex1_18.sce @@ -0,0 +1,28 @@ +//Example 1_18
+clc;
+clear;
+close;
+format('v',8);
+//given data :
+V1=10;//V
+V2=3;//V
+V3=6;//V
+R1=3;//ohm
+R2=4;//ohm
+R3=14;//ohm
+R4=8;//ohm
+R5=12;//ohm
+//Node B : (V1-VB)/R1=VB/R4+(VB-VC-V2)/R2
+//VB(1/R4+1/R1+1/R2)+VC*(-1/R2)=V2/R2+V1/R1//eq(1)
+A1=[(1/R4+1/R1+1/R2) (-1/R2)];//Coefficient Matrix
+B1=[V2/R2+V1/R1];//Coefficient Matrix
+//Node C: VC/R5=(VB-VC-V2)/R2+(V3-VC)/R3
+//VB*(-1/R2)+VC(1/R2+1/R5+1/R3)=V3/R3-V2/R2//eq(2)
+A2=[(-1/R2) (1/R2+1/R5+1/R3)]////Coefficient Matrix
+B2=[V3/R3-V2/R2];////Coefficient Matrix
+A=[A1;A2];B=[B1;B2];//Coefficient Matrix
+X=A^-1*B;//solution of matrix
+VB=X(1);//V
+VC=X(2);//V
+I2=VB/R4;//A
+disp(I2,"Current through 8 ohm resistor(A)");
diff --git a/2672/CH1/EX1.19/Ex1_19.sce b/2672/CH1/EX1.19/Ex1_19.sce new file mode 100755 index 000000000..0976378e8 --- /dev/null +++ b/2672/CH1/EX1.19/Ex1_19.sce @@ -0,0 +1,23 @@ +//Example 1_19
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+E1=2.05;//V
+E2=2.15;//V
+V3=6;//V
+R1=0.05;//ohm
+R2=0.04;//ohm
+R3=1;//ohm
+//Considering E1 only, Make E2 short circuit
+I1=E1/(R1+R2*R3/(R2+R3));//A
+disp(I1,"Current supplied by battery1(A)");
+I1dash=I1*R2/(R2+R3);//A
+format('v',6);
+//Considering E2 only, Make E1 short circuit
+I2=E2/(R2+R1*R3/(R1+R3));//A
+disp(I2,"Current supplied by battery2(A)");
+I2dash=I2*R1/(R1+R3);//A
+I=I1dash+I2dash;//A
+disp(I,"Current through 1ohm resistance, Load current(A)");
diff --git a/2672/CH1/EX1.2/Ex1_2.sce b/2672/CH1/EX1.2/Ex1_2.sce new file mode 100755 index 000000000..d8607d97f --- /dev/null +++ b/2672/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,13 @@ +//Example 1_2
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+Is=100;//A
+Rsh=10;//ohm
+//Source Conversion
+Vs=Is*Rsh;//V
+disp(Vs,"Equivalent voltage source(V)");
+Rse=Rsh;//ohm
+disp(Rse,"Internal resistance in series(ohm)");
diff --git a/2672/CH1/EX1.20/Ex1_20.sce b/2672/CH1/EX1.20/Ex1_20.sce new file mode 100755 index 000000000..13348879a --- /dev/null +++ b/2672/CH1/EX1.20/Ex1_20.sce @@ -0,0 +1,18 @@ +//Example 1_20
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=20;//V
+I=2;//A
+V3=6;//V
+R1=2;//ohm
+R2=4;//ohm
+R3=8;//ohm
+//Considering current source only, Make Voltage source short circuit
+I1dash=I*R1/(R1+R3);//A
+//Considering Voltage source only, Make Current source opent circuit
+I1dash2=V/(R1+R3);//A
+I=I1dash2-I1dash;//A
+disp(I,"Current through 8 ohm resistor from A to B(A)");
diff --git a/2672/CH1/EX1.21/Ex1_21.sce b/2672/CH1/EX1.21/Ex1_21.sce new file mode 100755 index 000000000..47b23475f --- /dev/null +++ b/2672/CH1/EX1.21/Ex1_21.sce @@ -0,0 +1,26 @@ +//Example 1_21
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=90;//V
+V2=50;//V
+V3=100;//V
+R1=60;//ohm
+R2=40;//ohm
+R3=30;//ohm
+R4=60;//ohm
+R=6:36;//ohm
+//Open circuit AB
+I1=V1/(R1+R3);//A
+I2=V3/(R2+R4);//A
+//Potential of point A
+VA=I1*R3+V2;//V
+//Potential of point B
+VB=I2*R4;//V
+VOC=VA-VB;//V
+Req=R1*R3/(R1+R3)+R2*R4/(R2+R4);//ohm
+Imin=VOC/(Req+max(R));//A
+Imax=VOC/(Req+min(R));//A
+disp("The current through resistor R will vary from "+string(Imin)+" A to "+string(Imax)+" A.");
diff --git a/2672/CH1/EX1.22/Ex1_22.sce b/2672/CH1/EX1.22/Ex1_22.sce new file mode 100755 index 000000000..ab79e5eea --- /dev/null +++ b/2672/CH1/EX1.22/Ex1_22.sce @@ -0,0 +1,28 @@ +//Example 1_22
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+V1=24;//V
+V2=12;//V
+R1=4;//ohm
+R2=5;//ohm
+R3=3;//ohm
+R4=5;//ohm
+R5=3;//ohm
+RL=10;//ohm
+//Open circuit AB
+I=V1/(R1+R2+R3);//A
+//Potential of point A
+VBQ=0;//V//there is no current
+VPS=0;//V//there is no current
+VQP=I*(R2+R3);//V
+VSA=V2;//V
+//Potential of point A with respect to B
+VAB=VBQ+VQP+VPS-VSA;//V
+VOC=VAB;//V
+Req=R1*(R2+R3)/(R1+R2+R3)+R4+R5;//ohm
+//Thevenin equivalent current
+I=VOC/(Req+RL);//A
+disp(I,"Current flowing through load resistance(A)");
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)");
diff --git a/2672/CH1/EX1.24/Ex1_24.sce b/2672/CH1/EX1.24/Ex1_24.sce new file mode 100755 index 000000000..1d831b5ab --- /dev/null +++ b/2672/CH1/EX1.24/Ex1_24.sce @@ -0,0 +1,24 @@ +//Example 1_24
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+V1=6;//V
+V2=15;//V
+R1=6;//ohm
+R2=3;//ohm
+R3=4;//ohm
+R4=6;//ohm
+//writing KVL equation for the loop
+I=poly(0,'I');
+eqn=V2-R2*I-R1*I-V1;//KVL equation
+I=roots(eqn);//A
+VCD=V2-R2*I;//V
+//Potential of point A with respect to B
+VAB=VCD;//V
+VOC=VAB;//V
+Req=R1*R2/(R1+R2)+R3;//ohm
+//Thevenin equivalent current
+I=VOC/(Req+R4);//A
+disp(I,"Current flowing through terminal AB(A)");
diff --git a/2672/CH1/EX1.25/Ex1_25.sce b/2672/CH1/EX1.25/Ex1_25.sce new file mode 100755 index 000000000..8161fef5b --- /dev/null +++ b/2672/CH1/EX1.25/Ex1_25.sce @@ -0,0 +1,22 @@ +//Example 1_25
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+V1=2;//V
+R1=10;//ohm
+R2=20;//ohm
+R3=40;//ohm
+R4=30;//ohm
+R5=15;//ohm
+//solution
+VBC=R4/(R4+R1)*V1;//V
+VDC=R5/(R2+R5)*V1;//V
+VBD=VBC-VDC;//V
+Vth=VBD;//V
+Req=R1*R4/(R1+R4)+R2*R5/(R2+R5);//ohm
+//Thevenin equivalent current
+IL=Vth/(Req+R3);//A
+IL=IL*1000;//mA
+disp(IL,"Current through BD, from B to D(mA)");
diff --git a/2672/CH1/EX1.26/Ex1_26.sce b/2672/CH1/EX1.26/Ex1_26.sce new file mode 100755 index 000000000..7e5fad1f2 --- /dev/null +++ b/2672/CH1/EX1.26/Ex1_26.sce @@ -0,0 +1,25 @@ +//Example 1_26
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+E1=140;//V
+R1=30;//ohm
+R2=70;//ohm
+E2=85;//V
+RL=[5 15 50];//ohm
+//solution
+//writing KVL equation for the loop
+I=poly(0,'I');
+eqn=E1-R1*I-R2*I-E2;//KVL equation
+I=roots(eqn);//A
+Vth=E1-I*R1;//V
+Req=R1*R2/(R1+R2);//ohm
+//Thevenin equivalent current
+IL1=Vth/(Req+RL(1));//A//for RL=5 ohm
+IL2=Vth/(Req+RL(2));//A//for RL=15 ohm
+IL3=Vth/(Req+RL(3));//A//for RL=50 ohm
+disp(IL1,"RL=5 ohm, branch current I2(A)");
+disp(IL2,"RL=15 ohm, branch current I2(A)");
+disp(IL3,"RL=50 ohm, branch current I2(A)");
diff --git a/2672/CH1/EX1.27/Ex1_27.sce b/2672/CH1/EX1.27/Ex1_27.sce new file mode 100755 index 000000000..0d58cdf74 --- /dev/null +++ b/2672/CH1/EX1.27/Ex1_27.sce @@ -0,0 +1,29 @@ +//Example 1_27
+clc;
+clear;
+close;
+format('v',4);
+//given data :
+V1=20;//V
+V2=4;//V
+R1=500;//ohm
+R2=1000;//ohm
+R3=100;//ohm
+R4=800;//ohm
+RL=1000;//ohm
+//solution
+VCB=-R2/(R4+R2)*V1;//V
+//writing KVL equation for the loop
+I=poly(0,'I');
+eqn=V1-R1*I-V2-R3*I;//KVL equation
+I=roots(eqn);//A
+VCA=-I*R1;//V
+//Potential at point B with respect to A
+VBA=VCB-VCA;//V
+VOC=VBA;//V
+Vth=VOC;//V
+Req=R1*R3/(R1+R3)+R2*R4/(R2+R4);//ohm
+//Thevenin equivalent current
+IL=Vth/(Req+RL);//A
+IL=IL*1000;//mA
+disp(IL,"Current through 1000 ohm resistor(mA)");
diff --git a/2672/CH1/EX1.28/Ex1_28.sce b/2672/CH1/EX1.28/Ex1_28.sce new file mode 100755 index 000000000..a28f2bb16 --- /dev/null +++ b/2672/CH1/EX1.28/Ex1_28.sce @@ -0,0 +1,27 @@ +//Example 1_28
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=15;//V
+V2=4;//V
+R1=4;//ohm
+R2=3;//ohm
+R3=2;//ohm
+R4=5;//ohm
+I1=6;//A
+RL=R4;//ohm
+//solution
+Req=R1*R3/(R1+R3)+R2;//ohm
+//Converting current source into Voltage source
+V2=I1*R3;//V//Converted source
+//writing KVL equation for the loop
+I=poly(0,'I');
+eqn=V1-R1*I-R3*I-V2;//KVL equation
+I=roots(eqn);//A
+//Potential at point A with respect to B
+VAB=V2+R3*I;//V
+//Thevenin equivalent current
+I=VAB/(Req+RL);//A
+disp(I,"Current through 5 ohm resistor(A)");
diff --git a/2672/CH1/EX1.29/Ex1_29.sce b/2672/CH1/EX1.29/Ex1_29.sce new file mode 100755 index 000000000..7b57aeed9 --- /dev/null +++ b/2672/CH1/EX1.29/Ex1_29.sce @@ -0,0 +1,40 @@ +//Example 1_29
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=12;//V
+V2=24;//V
+R1=4;//ohm
+R2=4;//ohm
+R3=4;//ohm
+RL=5;//ohm
+//solution by Norton Theorem
+//Short Circuit AB
+I=V1/(R1*R3/(R1+R3));//A
+ISC1=I*R3/(R1+R3);//A
+ISC2=V2/R3;//A
+ISC=ISC1+ISC2;//A
+Req=R1*R3/(R1+R3);//ohm
+//Norton equivalent current
+IL=ISC*Req/(Req+RL);//A
+disp(IL,"By Nortons theorem, Current through load resistance(A)");
+//solution by Thevenin Theorem
+Rth=Req;//ohm
+//Loop PQRS, Applying KVL
+//V1-I1*R1-I2*R1=0
+A1=[-R1 -R1];//Coefficient Matrix
+B1=[-V1];//Coefficient Matrix
+//Loop NTRS, Applying KVL
+//V2-I2*R3-R2*I2-R1*I1-R1*I2=0
+A2=[-R3-R2-R1 -R1];//Coefficient Matrix
+B2=[-V2];//Coefficient Matrix
+A=[A1;A2];//Coefficient Matrix
+B=[B1;B2];//Coefficient Matrix
+X=A^-1*B;//soolution matrix
+I1=X(1);//A
+I2=X(2);//A
+VOC=V2-R3*I2;//A
+IL=VOC/(Rth+RL);//A
+disp(IL,"By Thevenins theorem, Current through load resistance(A)");
diff --git a/2672/CH1/EX1.3/Ex1_3.sce b/2672/CH1/EX1.3/Ex1_3.sce new file mode 100755 index 000000000..af3eeff7f --- /dev/null +++ b/2672/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,15 @@ +//Example 1_3
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+Vs=12;//V
+Req=2+4*(2+2)/(4+(2+2));//ohm
+I=Vs/Req;//A
+I1=I;//A(Current in first 2 ohm resistance)
+disp(I1,"Current in first 2 ohm resistance(A)");
+I2=I/2;//A(Current in 4 ohm resistance)
+disp(I2,"Current in 4 ohm resistance(A)");
+I3=I/2;//A(Current in remaining 2 ohm resistances)
+disp(I3,"Current in remaining 2 ohm resistances(A)");
diff --git a/2672/CH1/EX1.30/Ex1_30.sce b/2672/CH1/EX1.30/Ex1_30.sce new file mode 100755 index 000000000..42dc8dd6e --- /dev/null +++ b/2672/CH1/EX1.30/Ex1_30.sce @@ -0,0 +1,34 @@ +//Example 1_30
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+I1=10;//A
+V2=12;//V
+R1=2;//ohm
+R2=2;//ohm
+R3=6;//ohm
+R4=6;//ohm
+//solution by Norton Theorem
+RL=R4;//ohm
+//Short Circuit AB
+ISC1=I1*R1/(R1+R2);//A//by current source
+ISC2=V2/R3;//A///by voltage source
+ISC=ISC1+ISC2;//A
+Req=(R1+R2)*R3/(R1+R2+R3);//ohm
+//Norton equivalent current
+I=ISC*Req/(Req+RL);//A
+disp(I,"By Nortons theorem, Current through 6 ohm resistance connected across AB(A)");
+//solution by Thevenin Theorem
+Rth=Req;//ohm
+//Converting current source into Voltage source
+V1=I1*R1;//V//Converted source
+//Applying KVL
+I=poly(0,'I');//A
+eqn=V1-R1*I-R2*I-R3*I-V2;//
+I=roots(eqn);//A
+VOC=V2+R3*I;//A
+I=VOC/(Rth+RL);//A
+disp(I,"By Thevenins theorem, Current through 6 ohm resistance connected across AB(A)");
+//Unit of current is given wrong in the book.
diff --git a/2672/CH1/EX1.31/Ex1_31.sce b/2672/CH1/EX1.31/Ex1_31.sce new file mode 100755 index 000000000..996e28882 --- /dev/null +++ b/2672/CH1/EX1.31/Ex1_31.sce @@ -0,0 +1,50 @@ +//Example 1_31
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=12;//V
+V2=6;//V
+V3=24;//V
+R1=4;//ohm
+R2=2;//ohm
+R3=6;//ohm
+R4=3;//ohm
+R5=12;//ohm
+R6=16;//ohm
+//solution by Norton Theorem
+RL=R6;//ohm
+//Thevenin theorem
+//Loop 1 applying KVL
+//V1-(R1+R2)*I1+V2-R3*(I1+I2);
+A1=[-R1-R2-R3 -R3];//Coefficient Matrix
+B1=[-V1-V2];//Coefficient Matrix
+//Loop 2 applying KVL
+//V3-R4*I2+V2-R3*(I1+I2)-R5*I2;
+A2=[-R3 -R4-R3-R5];//Coefficient Matrix
+B2=[-V3-V2];//Coefficient Matrix
+A=[A1;A2];//Coefficient Matrix
+B=[B1;B2];//Coefficient Matrix
+X=A^-1*B;//soolution matrix
+I1=X(1);//A
+I2=X(2);//A
+VOC=-R5*I2+V3;//V
+Rth=((R1+R2)*R3/(R1+R2+R3)+R4)*R5/((R1+R2)*R3/(R1+R2+R3)+R4+R5);//ohm
+I=VOC/(Rth+RL);//A
+disp(I,"By Thevenin Theorem, current through 16 ohm resistor(A)");
+//solution by Norton Theorem
+//Converting Voltage sources into current sources
+I1=V1/(R1+R2);//A
+I2=V2/R3;//A
+I3=V3/R5;//A
+Req=Rth;//ohm
+//Combining I1 & I2 | parallel & opposite
+I1=I1-I2;//A
+I2=0;//A
+ISC1=I1/2;//A//considering I1 only
+ISC2=I3;//A//considering I3 only
+ISC=ISC1+ISC2;//A
+//Norton equivalent current
+I=ISC*Req/(Req+RL);//A
+disp(I,"By Nortons theorem, current through 16 ohm resistor(A)");
diff --git a/2672/CH1/EX1.32/Ex1_32.sce b/2672/CH1/EX1.32/Ex1_32.sce new file mode 100755 index 000000000..2ac431656 --- /dev/null +++ b/2672/CH1/EX1.32/Ex1_32.sce @@ -0,0 +1,21 @@ +//Example 1_32
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=12;//V
+R1=2;//ohm
+R2=2;//ohm
+R3=2;//ohm
+R4=2;//ohm
+R5=2;//ohm
+//calculating Open circuit voltage :
+I=V/(R1+R2+R3);//V
+VCD=I*R3;//V
+VAB=VCD;//V//Open circuit voltage
+Req=(R1+R2)*R3/(R1+R2+R3)+R4+R5;//ohm
+RL=Req;//ohm//For maximum Power transfer
+disp(RL,"For maximum Power transfer, RL(ohm)");
+PLmax=VAB^2/4/RL;//W
+disp(PLmax,"Value of maximum Power(W)");
diff --git a/2672/CH1/EX1.33/Ex1_33.sce b/2672/CH1/EX1.33/Ex1_33.sce new file mode 100755 index 000000000..21eddb671 --- /dev/null +++ b/2672/CH1/EX1.33/Ex1_33.sce @@ -0,0 +1,26 @@ +//Example 1_33
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=12;//V
+R1=3;//ohm
+R2=3;//ohm
+I2=6;//A
+//Converting currrent sources into Voltage sources
+V2=I2*R2;//V
+//writing KVL equation for the loop
+I=poly(0,'I');
+eqn=V1-R1*I-R2*I-V2;//KVL equation
+I=roots(eqn);//A
+VOC=V2+R2*I;//V
+Req=R1*R2/(R1+R2);//ohm
+RL=Req;//ohm//For maximum Power transfer
+disp(RL,"For maximum Power transfer, RL(ohm)");
+I=VOC/(Req+RL);//A
+PLmax=I^2*RL;//W
+disp(PLmax,"Value of maximum Power(W)");
+Ri=Req;//ohm
+Eta=1/(1+Ri/RL)*100;//%
+disp(Eta,"Power Transfer Efficiency(%)");
diff --git a/2672/CH1/EX1.34/Ex1_34.sce b/2672/CH1/EX1.34/Ex1_34.sce new file mode 100755 index 000000000..40d8c5bed --- /dev/null +++ b/2672/CH1/EX1.34/Ex1_34.sce @@ -0,0 +1,31 @@ +//Example 1_34
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=48;//V
+R1=4;//ohm
+R2=20;//ohm
+R3=12;//ohm
+R4=12;//ohm
+V2=12;//V
+//Open circuit AB
+I1=V1/(R1+R2);//A
+I2=V1/(R3+R4);//A
+VR1=V1*R1/(R1+R2);//V//across 4 ohm resistance
+VR2=V1*R2/(R1+R2);//V//across 20 ohm resistance
+VR3=V1*R3/(R3+R4);//V//across 12 ohm resistance
+VCE=VR2;//V
+VCD=VR3;//V
+VBC=V2+VR3;//V
+//POtential of A wih respect to B
+VOC=VCE-VBC;//V
+Rth=R1*R2/(R1+R2)+R3*R4/(R3+R4);//ohm
+Ri=Rth;//ohm
+RL=Ri;//ohm//For maximum Power transfer
+disp(RL,"For maximum Power transfer, RL(ohm)");
+I=VOC/(Rth+RL);//A
+PL=I^2*RL;//W
+disp(PL,"Value of maximum Power(W)");
+//Answer in the textbook is wrong.
diff --git a/2672/CH1/EX1.35/Ex1_35.sce b/2672/CH1/EX1.35/Ex1_35.sce new file mode 100755 index 000000000..7f62bb93e --- /dev/null +++ b/2672/CH1/EX1.35/Ex1_35.sce @@ -0,0 +1,25 @@ +//Example 1_35
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=12;//V
+R1=4;//ohm
+R2=6;//ohm
+R3=6;//ohm
+R4=6;//ohm
+//Current by the source while -AB open circuit
+I=V/(R2*R3*R4/(R2*R3+R3*R4+R2*R4)+R1);//A
+//Voltage across AB
+VOC=I*(R2*R3*R4/(R2*R3+R3*R4+R2*R4));//V\
+//Thevenin equivalent Resistance
+Rth=(R2*R3*R4/(R2*R3+R3*R4+R2*R4)*R1/(R2*R3*R4/(R2*R3+R3*R4+R2*R4)+R1));//ohm
+Ri=Rth;//ohm
+RL=Ri;//ohm//For maximum Power transfer
+disp(RL,"For maximum Power transfer, RL(ohm)");
+I=VOC/(Rth+RL);//A
+PL=I^2*RL;//W
+disp(PL,"Value of maximum Power(W)");
+Eta=RL/(RL+Ri)*100;//%
+disp(Eta,"Power Transfer Efficiency(%)");
diff --git a/2672/CH1/EX1.36/Ex1_36.sce b/2672/CH1/EX1.36/Ex1_36.sce new file mode 100755 index 000000000..39e553280 --- /dev/null +++ b/2672/CH1/EX1.36/Ex1_36.sce @@ -0,0 +1,21 @@ +//Example 1_36
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+R1=3;//ohm
+R2=6;//ohm
+R3=3;//ohm
+R4=3;//ohm
+R5=6;//ohm
+R6=3;//ohm
+R25=R2*R5/(R2+R5);//ohm
+RBC=R25;//ohm
+RAB=R4;//ohm
+RAC=R6;//ohm
+RA=RAB*RAC/(RAB+RAC+RBC);//ohm
+RB=RAB*RBC/(RAB+RAC+RBC);//ohm
+RC=RAC*RBC/(RAB+RAC+RBC);//ohm
+RPQ=(R1+RB)*(R3+RA)/(R1+RB+R3+RA)+RC;//ohm
+disp(RPQ,"Equivalent Resistance across P & Q(ohm)");
diff --git a/2672/CH1/EX1.37/Ex1_37.sce b/2672/CH1/EX1.37/Ex1_37.sce new file mode 100755 index 000000000..d38cc4cd8 --- /dev/null +++ b/2672/CH1/EX1.37/Ex1_37.sce @@ -0,0 +1,18 @@ +//Example 1_37
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=12;//V
+RAB=3;//ohm
+RAC=3;//ohm
+RBC=3;//ohm
+RBD=3;//ohm
+RCD=3;//ohm
+RA=RAB*RAC/(RAB+RAC+RBC);//ohm
+RB=RAB*RBC/(RAB+RAC+RBC);//ohm
+RC=RAC*RBC/(RAB+RAC+RBC);//ohm
+Req=RA+(RB+RBD)*(RC+RCD)/(RB+RBD+RC+RCD);//ohm
+I=V/Req;//A
+disp(I,"Current I supplied by the battery(A)");
diff --git a/2672/CH1/EX1.4/Ex1_4.sce b/2672/CH1/EX1.4/Ex1_4.sce new file mode 100755 index 000000000..0c9c6d453 --- /dev/null +++ b/2672/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,13 @@ +//Example 1_4
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+Vs=6;//V
+//Point A & C, B & D are shorted
+RAB=(4*4/(4+4));//ohm
+RDC=(4*4/(4+4));//ohm
+Req=RAB*RDC/(RAB+RDC);//ohm
+Is=Vs/Req;//A
+disp(Is,"Current supplied by the battery(A)");
diff --git a/2672/CH1/EX1.40/Ex1_40.sce b/2672/CH1/EX1.40/Ex1_40.sce new file mode 100755 index 000000000..03325f790 --- /dev/null +++ b/2672/CH1/EX1.40/Ex1_40.sce @@ -0,0 +1,19 @@ +//Example 1_40
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V=24;//V
+R1=7;//ohm
+R2=7;//ohm
+R3=7;//ohm
+R4=7;//ohm
+R5=8;//ohm
+R6=10;//ohm
+RAB=(R5*R6/(R5+R6)+R4)*(R2+R3)/(R5*R6/(R5+R6)+R4+R2+R3)+R1;//ohm
+I=V/RAB;//A
+I2=I*(R2+R3)/(R2+R3+R5*R6/(R5+R6)+R4);//A
+VPQ=I2*(R5*R6/(R5+R6));//V
+disp(VPQ,"Voltage drop across the 10 ohm resistor(V)");
+//Answer in the book is not accurate.
diff --git a/2672/CH1/EX1.41/Ex1_41.sce b/2672/CH1/EX1.41/Ex1_41.sce new file mode 100755 index 000000000..4aac80ea9 --- /dev/null +++ b/2672/CH1/EX1.41/Ex1_41.sce @@ -0,0 +1,12 @@ +//Example 1_41
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+R1=5;//ohm
+R2=5;//ohm
+R3=10;//ohm
+R4=10;//ohm
+RAB=(R1+R3)*(R2+R4)/(R1+R3+R2+R4);//ohm
+disp(RAB,"Equivalent resistance(ohm)");
diff --git a/2672/CH1/EX1.42/Ex1_42.sce b/2672/CH1/EX1.42/Ex1_42.sce new file mode 100755 index 000000000..1c5770a67 --- /dev/null +++ b/2672/CH1/EX1.42/Ex1_42.sce @@ -0,0 +1,25 @@ +//Example 1_42
+clc;
+clear;
+close;
+format('v',4);
+//given data :
+V=24;//V
+R1=2;//ohm
+R2=3;//ohm
+R3=5;//ohm
+R4=8;//ohm
+R5=2;//ohm
+R6=5;//ohm
+R7=3;//ohm
+R8=6;//ohm
+R57=R5+R7;//ohm//in series
+RAB=R3;//ohm
+RAC=R57;//ohm
+RBC=R6;//ohm
+RA=RAB*RAC/(RAB+RAC+RBC);//ohm
+RB=RAB*RBC/(RAB+RAC+RBC);//ohm
+RC=RAC*RBC/(RAB+RAC+RBC);//ohm
+Req=R1+RA+(RC+R8)*(RB+R4)/(RC+R8+RB+R4)+R2;//ohm
+I=V/Req;//A
+disp(I,"Total current by the battery(A)");
diff --git a/2672/CH1/EX1.43/Ex1_43.sce b/2672/CH1/EX1.43/Ex1_43.sce new file mode 100755 index 000000000..18c469495 --- /dev/null +++ b/2672/CH1/EX1.43/Ex1_43.sce @@ -0,0 +1,18 @@ +//Example 1_43
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+VAP=25;//V
+RAP=15;//ohm
+RAQ=5;//ohm
+R3=5;//ohm
+RBP=10;//ohm
+RBQ=20;//ohm
+RAB=RAP*RAQ/(RAP+RAQ)+RBP*RBQ/(RBP+RBQ);//ohm
+disp(RAB,"Equivalent resistance across terminal AB(ohm)");
+I=VAP/(RAP*RAQ/(RAP+RAQ));//A
+VBQ=(RBP*RBQ/(RBP+RBQ))*I;//V
+V=VAP+VBQ;///V
+disp(V,"Required Voltage(V)");
diff --git a/2672/CH1/EX1.45/Ex1_45.sce b/2672/CH1/EX1.45/Ex1_45.sce new file mode 100755 index 000000000..3b440a45b --- /dev/null +++ b/2672/CH1/EX1.45/Ex1_45.sce @@ -0,0 +1,16 @@ +//Example 1_45
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+RAB=4;//ohm
+RAC=6;//ohm
+RBC=2;//ohm
+RBD=10;//ohm
+RCD=14;//ohm
+RA=RAB*RAC/(RAB+RAC+RBC);//ohm
+RB=RAB*RBC/(RAB+RAC+RBC);//ohm
+RC=RAC*RBC/(RAB+RAC+RBC);//ohm
+Req=RA+(RB+RBD)*(RC+RCD)/(RB+RBD+RC+RCD);//ohm
+disp(Req,"Total Resistance(ohm)");
diff --git a/2672/CH1/EX1.46/Ex1_46.sce b/2672/CH1/EX1.46/Ex1_46.sce new file mode 100755 index 000000000..5738b16f4 --- /dev/null +++ b/2672/CH1/EX1.46/Ex1_46.sce @@ -0,0 +1,16 @@ +//Example 1_46
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+RAD=20;//ohm
+RAC=30;//ohm
+RDC=50;//ohm
+RDB=50;//ohm
+RBC=45;//ohm
+RAN=RAD*RAC/(RAD+RAC+RDC);//ohm
+RDN=RAD*RDC/(RAD+RAC+RDC);//ohm
+RCN=RAC*RDC/(RAD+RAC+RDC);//ohm
+RAB=RAN+(RDN+RDB)*(RCN+RBC)/(RDN+RDB+RCN+RBC);//ohm
+disp(RAB,"Total Resistance between terminal A & B(ohm)");
diff --git a/2672/CH1/EX1.47/Ex1_47.sce b/2672/CH1/EX1.47/Ex1_47.sce new file mode 100755 index 000000000..680c58433 --- /dev/null +++ b/2672/CH1/EX1.47/Ex1_47.sce @@ -0,0 +1,24 @@ +//Example 1_47
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=6;//V
+V2=5;//V
+V3=8;//V
+R1=2;//ohm
+R2=2;//ohm
+R3=5;//ohm
+R4=4;//ohm
+//Node A :
+VA=poly(0,'VA');
+I1=(V1-VA)/R1;//A
+I2=(V2-VA)/R2;//A
+I3=(V3+VA)/R3;//A
+//KCL at Node A
+eqn=I1+I2-I3;
+VA=roots(eqn);//V
+VB=-V3;//V
+I3=(VA-VB)/R3;//A
+disp(I3,"Current flowing through 5 ohm Resistance(A)");
diff --git a/2672/CH1/EX1.48/Ex1_48.sce b/2672/CH1/EX1.48/Ex1_48.sce new file mode 100755 index 000000000..ba3568c3e --- /dev/null +++ b/2672/CH1/EX1.48/Ex1_48.sce @@ -0,0 +1,37 @@ +//Example 1_48
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+V1=12;//V
+V2=3;//V
+V3=6;//V
+R1=2;//ohm
+R2=8;//ohm
+R3=4;//ohm
+R4=10;//ohm
+R5=12;//ohm
+//Node A//I1=I2+I3
+VA=poly(0,'VA');
+VB=poly(0,'VB');
+I1=(V1-VA)/R1;//A
+VK=VA-V2;//V
+//I2=(VK-VB)/R3;//A
+I3=VA/R2;//A
+//7*VA-2*VB=56//eqn(1)
+A1=[7 -2];//Coefficient Matrix
+B1=[56];//Coefficient Matrix
+//Node B //I2+I5=I4
+I5=(V3-VB)/R5;//A
+I4=VB/R4;//A
+//15*VA-26*VB=15//eqn(2)
+A2=[15 -26];//Coefficient Matrix
+B2=[15];//Coefficient Matrix
+A=[A1;A2];//Coefficient Matrix
+B=[B1;B2];//Coefficient Matrix
+X=A^-1*B;//solution Matrix
+VA=X(1);//V
+VB=X(2);//V
+I3=VA/R2;//A
+disp(I3,"Current through 8 ohm resistor(A)");
diff --git a/2672/CH1/EX1.49/Ex1_49.sce b/2672/CH1/EX1.49/Ex1_49.sce new file mode 100755 index 000000000..eca0933d3 --- /dev/null +++ b/2672/CH1/EX1.49/Ex1_49.sce @@ -0,0 +1,52 @@ +//Example 1_49
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+I1=1;//A
+V3=12;//V
+I4=0.5;//A
+R1=10;//ohm
+R2=10;//ohm
+R3=20;//ohm
+R4=20;//ohm
+R5=20;//ohm
+//Node B//I1=I2+I3
+VB=poly(0,'VB');
+VC=poly(0,'VC');
+VD=poly(0,'VD');
+I2=(VB)/R1;//A
+//I3=(VB-VC)/R1;//A
+//2*VB-VC=10//eqn(1)
+A1=[2 -1 0];//Coefficient Matrix
+B1=[10];//Coefficient Matrix
+//Node C //I3=I4+I5
+I4=(VC-V3)/R3;//A
+//I5=(VC-VD)/R4;//A
+//2*VB-4*VC+VD=-12//eqn(2)
+A2=[2 -4 1];//Coefficient Matrix
+B2=[-12];//Coefficient Matrix
+//Node D //I6=I5+I7
+I6=VD/R5;//A
+I7=I4;//A
+//VC-2*VD=-10//eqn(3)
+A3=[0 1 -2];//Coefficient Matrix
+B3=[-10];//Coefficient Matrix
+A=[A1;A2;A3];//Coefficient Matrix
+B=[B1;B2;B3];//Coefficient Matrix
+X=A^-1*B;//solution Matrix
+VB=X(1);//V
+VC=X(2);//V
+VD=X(3);//V
+I2=(VB)/R1;//A
+I3=(VB-VC)/R1;//A
+I5=(VC-VD)/R4;//A
+I4=(-I3-I5);//A
+I6=VD/R5;//A
+disp("Current in various branches are : ");
+disp(I2,"Current I2(A)");
+disp(I3,"Current I3(A)");
+disp(I4,"Current I4(A)");
+disp(I5,"Current I5(A)");
+disp(I6,"Current I6(A)");
diff --git a/2672/CH1/EX1.5/Ex1_5.sce b/2672/CH1/EX1.5/Ex1_5.sce new file mode 100755 index 000000000..6fc961c4f --- /dev/null +++ b/2672/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,11 @@ +//Example 1_5
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+//Point B & C are shorted
+RAB=(4*4/(4+4));//ohm
+RBD=(4*4/(4+4));//ohm
+Req=RAB+RBD;//ohm
+disp(Req,"Equivalent Resistance(ohm)");
diff --git a/2672/CH1/EX1.50/Ex1_50.sce b/2672/CH1/EX1.50/Ex1_50.sce new file mode 100755 index 000000000..25ec3958c --- /dev/null +++ b/2672/CH1/EX1.50/Ex1_50.sce @@ -0,0 +1,31 @@ +//Example 1_50
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+I=8;//A
+I4=6;//A
+R1=3;//ohm
+R2=2;//ohm
+R3=4;//ohm
+//Applying KCL//I=I1+I2
+//I=V1/R1+V1/R2-V2/R2//eqn(1)
+A1=[1/R1+1/R2 -1/R2];//Coefficient Matrix
+B1=[I];//Coefficient Matrix
+//Applying KCL//I2=I3+I4
+//V1/R2-V2/R2-V2/R3=I4//eqn(2)
+A2=[1/R2 -1/R2-1/R3];//Coefficient Matrix
+B2=[I4];//Coefficient Matrix
+A=[A1;A2];//Coefficient Matrix
+B=[B1;B2];//Coefficient Matrix
+X=A^-1*B;//solution Matrix
+V1=X(1);//V
+V2=X(2);//V
+I1=V1/R1;//A
+I2=V1/R2-V2/R2;//A
+I3=(V2)/R3;//A
+disp("Current in various branches are : ");
+disp(I1,"Current I1(A)");
+disp(I2,"Current I2(A)");
+disp(I3,"Current I3(A)");
diff --git a/2672/CH1/EX1.6/Ex1_6.sce b/2672/CH1/EX1.6/Ex1_6.sce new file mode 100755 index 000000000..fa68f68e2 --- /dev/null +++ b/2672/CH1/EX1.6/Ex1_6.sce @@ -0,0 +1,19 @@ +//Example 1_6
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+format('v',6);
+I=2;//A
+//3*I1+8*I2=6 from loop ABCA
+//7*I1-5*I2=0 from loop ADCA
+A=[3 8;7 -5];//coefiicient matrix
+B=[6;0];//coefiicient matrix
+X=A^-1*B;//Matrix multiplication
+I1=X(1);//A
+I2=X(2);//A
+I3=I-I1-I2;//A
+disp(I3,"Current in branch AB & BC(A)");
+disp(I1,"Current in branch AD & DC(A)");
+disp(I2,"Current in branch AC(A)");
diff --git a/2672/CH1/EX1.7/Ex1_7.sce b/2672/CH1/EX1.7/Ex1_7.sce new file mode 100755 index 000000000..9c50ad6e8 --- /dev/null +++ b/2672/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,15 @@ +//Example 1_7
+clc;
+clear;
+close;
+format('v',5);
+//given data :
+//11*I2+8*I3=4 from loop GDAG
+//8*I2+11*I3=6 from loop HDAH
+A=[11 8;8 11];//coefiicient matrix
+B=[4;6];//coefiicient matrix
+X=A^-1*B;//Matrix multiplication
+I2=X(1);//A
+I3=X(2);//A
+I8=I2+I3;//A
+disp(I8,"Current in 8 ohm resistor(A)");
diff --git a/2672/CH1/EX1.8/Ex1_8.sce b/2672/CH1/EX1.8/Ex1_8.sce new file mode 100755 index 000000000..d841b77c7 --- /dev/null +++ b/2672/CH1/EX1.8/Ex1_8.sce @@ -0,0 +1,17 @@ +//Example 1_8
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+//6*I1-3*I2=2 from mesh 1
+//-6*I1+14*I2=4 from mesh 2
+A=[6 -3;-6 14];//coefiicient matrix
+B=[2;4];//coefiicient matrix
+X=A^-1*B;//Matrix multiplication
+I1=X(1);//A
+I2=X(2);//A
+disp(I1,"Current in 2ohm & 4ohm resistor(A)");
+disp(I2,"Current in 3ohm & 5ohm resistor(A)");
+I6ohm=I1-I2;//A(Current in 6ohm resistor)
+disp(I6ohm,"Current in 6ohm resistor(A)");
diff --git a/2672/CH1/EX1.9/Ex1_9.sce b/2672/CH1/EX1.9/Ex1_9.sce new file mode 100755 index 000000000..da0243cc4 --- /dev/null +++ b/2672/CH1/EX1.9/Ex1_9.sce @@ -0,0 +1,16 @@ +//Example 1_9
+clc;
+clear;
+close;
+format('v',6);
+//given data :
+//9*I1-2*I2-3*I3=24-V from mesh 1
+//I1-6*I2+3*I3=0 from mesh 2
+//3*I1+6*I2-11*I3=-V from mesh 3
+d=[9 -2 -3;1 -6 3;3 6 -11];
+delta=det(d);//determinant
+//d1=[24-V -2 -3;0 -6 3;-V 6 -11];
+//delta1=det(d1);determinant
+//Putting I1=delta1/delta=0
+V=(24*(66-18))/((66-18)+(-6-18));//V
+disp(V,"Unknown Voltage(V)");
|