Question: Hw4 2 Given the circuit shown at right. Equations for the three loops are written as follows Ral2 + R4(h-h) + R1(2-4)-V2 loop 2 R,
Hw4 2 Given the circuit shown at right. Equations for the three loops are written as follows Ral2 + R4(h-h) + R1(2-4)-V2 loop 2 R, 20 R,- 25 Let Vi-10, V2-20 and V,-100. Write a function M-file that takes as input 5 resistors in an array, and returns the 3 currents in an array as output R, 10 Your code should be placing the equations in matrix form and using the backslash to solve. For example: >R [20 10 25 10 30] ans - 2.4700 1.7800 2.8500 Your Function 1 function i LoopCurrent(R) 2 3 %compute loop currents in a circuit 4 % 1 LoopCurrent (R) 5 % INPUT R: five resistors in the circuit 6 % OUTPUT : three loop currents 7 1 9 10: end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
