Vectors and Sum operation
Ältere Kommentare anzeigen
Trying to use sum to figure about resistor formula, 1/[(1/r1)+1rn)] where n can be any number.
What i have come up with:
function R = scirpt(y)
R = 1/sum(1/(y));
end
Well be entering this:
scirpt([100,200,300]) should output 54.5455
if true
% code
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Stair Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!