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 /2297/CH2/EX2.2 | |
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 '2297/CH2/EX2.2')
-rwxr-xr-x | 2297/CH2/EX2.2/Ex2_2.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/2297/CH2/EX2.2/Ex2_2.sce b/2297/CH2/EX2.2/Ex2_2.sce new file mode 100755 index 000000000..3586610ac --- /dev/null +++ b/2297/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,23 @@ +// Example 2.2 :current +clc; +close; +clear; +// given : +vs1=72;//voltage in volts +vs2=40;//voltage in volts +R1=36;//resistance in ohm +R2=10;//resistance in ohm +ig=2;//current in amperes +Rx=8;//resistance in ohm +//(va-72)/36+(va-40)/10 -2 +va/8=0 node equation at 1 +va=((R2*Rx*vs1)+(R1*Rx*vs2)+(R1*R2*Rx*ig))/((R2*Rx)+(R1*Rx)+(R1*R2));//voltage in volts +ix1=va/Rx;//current in amperes +//(R1+R2)*I1-R2*I2+vs2=vs1 loop equation 1 +//R2*I2-R2*I1+Ix*Rx=vs2 loop equation 2 +//Ix=I2+2 +A=[R1+R2 -R2;-R2 R2+Rx];//making equations +B=[vs1-vs2;vs2-2*Rx];//making equations +X=A\B;//solving equations +ix2=X(2,1)+ig;//current in amperes +disp(ix1,"current through Rx is(by node voltage method), (A)=") +disp(ix2,"current through Rx is (by loop current method),(A) =") |