diff options
Diffstat (limited to '1445/CH1/EX1.11/ch1_ex_11.sce')
-rw-r--r-- | 1445/CH1/EX1.11/ch1_ex_11.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/1445/CH1/EX1.11/ch1_ex_11.sce b/1445/CH1/EX1.11/ch1_ex_11.sce new file mode 100644 index 000000000..177535763 --- /dev/null +++ b/1445/CH1/EX1.11/ch1_ex_11.sce @@ -0,0 +1,25 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 11 + +disp("CHAPTER 1"); +disp("EXAMPLE 11"); + +//VARIABLE INITIALIZATION +I3=-5; //in Amperes + +//SOLUTION + +//(4)I1+(-2)I2=10...........eq (1) +//(-2)I1+(6)I2=-20..........eq (2) +//solving the equations using matrix method + +A=[4 -2; -2 6]; +b=[10;-20]; +x=inv(A)*b; +I1=x(1,:); //to access 1st element of 2X1 matrix +I2=x(2,:); //to access 2nd element of 2X1 matrix +I=I2-I3; +disp(sprintf("By Mesh analysis, the current through resistor R3 is %d A",I)); + +//END + |