56.1k views
0 votes
In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Call the function by Parallel(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.

User Bjorsig
by
5.4k points

1 Answer

4 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 Modi
by
5.8k points