165k views
0 votes
Electrical resistors are said to be connected "in series" if the same current flows through each of them and "in parallel" if the same voltage is applied across each. If in series, they are equivalent to a single resistor whose resistance is given by R = R1 + R2 + R3 + R4 + R5..... + Rn If in parallel, their equivalent resistance is given by 1 R = 1 R1 + 1 R2 + 1 R3 + 1 R4 + 1 R5 ..... + 1 Rn Write an m-file that prompts the user for the type of connection (series or parallel) and the number of resistors n and then computes the equivalent resistance. Use switch statement for the connection and while loop for the resistance calculation. (20 points)

User Khakionion
by
3.5k points

1 Answer

1 vote

Answer:

See explaination

Step-by-step explanation:

The M-file that prompts the user for the type of connection, series and parallel and number of resistors n, then computes the equivalent resistance is;

Please kindly go to attachment for a step by step explaination of the answer.

Electrical resistors are said to be connected "in series" if the same current-example-1
Electrical resistors are said to be connected "in series" if the same current-example-2
User Luviktor
by
3.1k points