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 /2672/CH1/EX1.14 | |
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 '2672/CH1/EX1.14')
-rwxr-xr-x | 2672/CH1/EX1.14/Ex1_14.sce | 26 |
1 files changed, 26 insertions, 0 deletions
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)");
|