Question: Please provide MATLAB code. I've got a circuit with two batteries, and Kirchoff's laws give me the equations i_1 + i_2 = i_3 V_1 -
Please provide MATLAB code.

I've got a circuit with two batteries, and Kirchoff's laws give me the equations i_1 + i_2 = i_3 V_1 - i_1R_1 - i_3R_3 = 0 V_2 - i_2R_2 - i_3R_3 = 0 The circuit has R_1 = 10 ohm, R_2 = 20 ohm, and R_3 = 40 ohm. The first battery has a fixed voltage V_1 = 40V, but the second battery can be adjusted to anything between 20V and 60V. Write a .m function file called circuit.m that takes V_2 as an input and produces an array containing i_1 i_2, and i_3 as an output. The function must use the backslash operator to solve the linear system. Use your function to find the currents in the circuit if V_2 = 60. Turn in the answer or your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
