Create a vertical array b for solving the system of equation

Create a vertical array, b: for solving the system of equations above. Solve for a vertical matrix containing I_1, I_2, and I_3. Use those values to calculate the voltage drop across each resistor, returning those drops as outputs in numbered order. For example, the following function call: [v1, v2, v3, v4] = rec9prob1(5, 55, 33, 100, 200); Will result in: v1 = 0.3938V v2 = 0.3938V v3 = 0.3938V v4 = 4.6062 V [Collaboration] For the following electric circuit: Where each blue square is a resistor, and the two parallel lines on the left represent a DC voltage source, we can perform a Kirchhoff\'s voltage analysis to find the voltage across each resistor using loop currents, like this: To set up the following system of equations: (R1 + R4)I_1 - R1I_2 = V -R1I_1 + (R1 + R2)I_2 - R2I_3 = 0 (R2 + R3)I_3 - R2I_2 = 0 Which can be used to find the voltage drop across each resistor: V_1 = (I_1 - I_2)R1 V_2 = (I_2 - I_3)R2 V_3 = I_3R3 V_4 = I_1R4 Write a function that has the following inputs in order: The voltage of the voltage source V, in volts. The value of R1 on ohms. The value of R2 in ohms. The value of R3 in ohms. The value of R4 in ohms. This function should: Create a matrix, A, for solving the system of equations above. [Collaboration] For the following electric circuit: Where each blue square is a resistor, and the two parallel lines on the left represent a DC voltage source, we can perform a Kirchhoff\'s voltage analysis to find the voltage across each resistor using loop currents, like this: To set up the following system of equations: Which can be used to find the voltage drop across each resistor: Write a function that has the following inputs in order: The voltage of the voltage source V, in volts. The value of R1 on ohms. The value of R2 in ohms. The value of R3 in ohms. The value of R4 in ohms. This function should: Create a matrix, A, for solving the system of equations above. Create a vertical array, b, for solving the system of equations above. Solve for a vertical matrix containing and Use those values to calculate the voltage drop across each resistor, returning those drops as outputs in numbered order. For example, the following function call: [v1, v2, v3, v4] = rec9prob1(5, 55, 33, 100, 200); Will result in: v1 = 0.3938V v2 = 0.3938V v3 = 0.3938V v4 = 4.6062V

Solution

Matlab function:

function V=rec2prob1(V,R1,R2,R3,R4);
v=[V;0;0];
R=[R1+R4,-R1,0;-R1,R1+R2,-R2;0,-R2,R2+R3];
I= transpose(linsolve(R,v));
v1=(I(1)-I(2))*R1;
v2=(I(2)-I(3))*R2;
v3=I(3)*R3;
v4=I(1)*R4;
V=[v1;v2;v3;v4]

 Create a vertical array, b: for solving the system of equations above. Solve for a vertical matrix containing I_1, I_2, and I_3. Use those values to calculate

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site