Q:

The overall electrical resistance of n resistors in parallel is given as:

0

Write a function Req that will receive a variable number of resistance values and will return the equivalent electrical resistance of the resistor network.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Req.m

function resis = Req(varargin)

% Calculates the resistance of n resistors in parallel

% Format of call: Req(res1, res2, ... , resn)

% Returns the overall resistance

resis = 0;

for i = 1:nargin

 resis = resis + 1/varargin{i};

end

resis = resis ^ -1;

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now