When n electrical resistors are connected in parallel, their equivalent resistan
ID: 3682290 • Letter: W
Question
When n electrical resistors are connected in parallel, their equivalent resistance R_Eq can be determined from: 1/R_Eq = 1/1/R_1 + 1/R_2 + ... +1/R_n Write a user-defined MATLAB function that calculates R_Eq. For the function name and arguments use REQ = req (R). The input to the function is a vector in which each element is a resistor value, and the output from the function is R_Eq. Now, write a script file to compute the current passing through a conductor (wire), when the voltage across the conductor V = 50 Volts; and the following resistors are connected in parallel: 50 Ohm, 75 Ohm, 300 Ohm, 60 Ohm, 500 Ohm, 180 Ohm, and 200 Ohm (The symbol Ohm stands for Ohms, the units of resistance). The formula for current, I, in terms of voltage and resistance, is I = V/R_Eq.Explanation / Answer
function REQ = req(R)
%this function takes the input from the user with n number of resistors and
%find the equivalent of all th resistors in the parallel connected resitance
%nargin function to find the length of the resistances input given
n = nargin;
%sum variable to store the value of the inverse of the resistances
sum = 0;
for i = 1:n
sum = sum+(1/R{i})
end
equiv = 1/sum;
script :
%initialize voltage
v = 50;
%initialize rsistance vector with given values
R = [50 75 300 60 500 180 200];
%calling user defined function to find equivalent resistence
eq = req(R)
%caculating current
i = v/eq;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.