67.1k views
4 votes
In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Call the function by ParallelR(Number), where Number is an integer between 1 and 10 which will be input from a command window prompt. Use a for loop Number times to find the Numerator and Denominator for parallel resistance. After the for loop you should find Solution as Num/Den. the number Solution will be returned by the function.

1 Answer

5 votes

Answer:

See explaination

Step-by-step explanation:

format RAT

Number=input('Enter the no. of resistors:');

R=ParallelR(Number)

function Req=ParallelR(N)

R=0;

for i=1:N

r=input('Enter Resistor Value:');

R=R+1/r;

end

Req=(1/R);

end

User OverLex
by
2.9k points