Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem-6: Electrical Circuit Analysis R1 28 R2 V2 R3 V3 16 60 80Vdc . V1 R4 30

ID: 2268282 • Letter: P

Question

Problem-6: Electrical Circuit Analysis R1 28 R2 V2 R3 V3 16 60 80Vdc . V1 R4 30 R5 10 0 The following set of equations defines the mesh currents in the circuit shown in the figure above + R2(11-12) + R4(11-13) = 0 R1i2 R3(i2-i3) + R2(i2 - i1) 0 R3(13-12) + R513 + R4(13-11) = 0 a. Write a MATLAB program to compute the mesh currents using the resistor values and voltage source value entered by the prgram user. Using the rank () function, the program should first check whether the system of equations has a solutiorn Hint: Start your program by requesting user inputs. R = input ('Enter the resistor values in Ohms, [R1 R5] : ' ); v = input ('Enter the voltage value in Volts: '); b. Test your program by using the values shown in the above figure.

Explanation / Answer

Matlab Script:

R = input('Enter the resistor values in ohms, [R1...R5]');
A = [R(2)+R(4) -R(2) -R(4);-R(2) R(1)+R(2)+R(3) -R(3);-R(4) -R(3) R(3)+R(4)+R(5)];
V = input('Enter the voltage value in Volts: ');
b = [V;0;0];

r = rank(A);

if (r<3) %if rank less than dimension of matrix then solution won't exist
disp('solution does not exist');
else
i = A;
disp(i);
end

command window log:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote