Write a function named r-series-max-power which computes the equivalent resistan
ID: 2248474 • Letter: W
Question
Write a function named r-series-max-power which computes the equivalent resistance and maximum power rating of a network of resistors in series. The function arguments are two row vectors (of equal length, lengthz1), the first containing resistance values and the second containing the corresponding power ratings. The function returns two values, equivalent resistance and maximum power rating. Note that the maximum power rating of the network occurs when at least one resistor is operating at its maximum power rating and no resistors are operating above their maximum power rating. Test the function on the following two examples and show the results (your output format may be slightly different than shown in the example) · 10 10], [5 5 5]) > r-eq-1 , max-power-1] req i-30.0 max_power_1 -15.000 > r_cq2 , max-power-2] e250 max_power 2- _ r-series max power ([ 10 -r-series max power ([10 20 201, [ 5 4 3j)Explanation / Answer
Matlab Script:
function [r_eq,max_power]=r_series_max_power(R,P)
r_eq = sum(R);
Imax = max(sqrt(P./R));
max_power = (Imax^2)*r_eq;
end
command window output:
>> [r_eq_1,max_power_1] = r_series_max_power([10 10 10],[5 5 5])
r_eq_1 =
30
max_power_1 =
15.0000
>> [r_eq_2,max_power_2] = r_series_max_power([10 20 20],[5 4 3])
r_eq_2 =
50
max_power_2 =
25.0000
>>
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.