Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Matlab please The body surface area (BSA) of a person (used for determining d

ID: 3788947 • Letter: I

Question

In Matlab please

The body surface area (BSA) of a person (used for determining dosage of medications) can be calculated by the following formula: BSA = 0.007184 W^0.425 H^0.75 Write one script file to set up the problem and call all your functions. Write an anonymous function named P3anon that calculates the BSA whose input arguments are W and H. Write a function file named P3 file that calculates the BSA whose input arguments are W and H. Use both your functions to calculate the BSA of the following people: Person A: 95 kg: 1.87 m; Person B: 61 kg, 1.58 m

Explanation / Answer

p3anon.m

function bsa = p3anon(w,h)
bsa = 0.007184 * ((w)^(0.425)) * (h^(0.75));
end

p3file.m

w = input('Please enter w ');
h = input('Please enter h ');
bsa = 0.007184 * ((w)^(0.425)) * (h^(0.75));
fprintf('BSA = %d ',bsa);

Sample Output:

>> p3file
Please enter w
95
Please enter h
1.87
BSA = 7.957563e-02
>> p3file
Please enter w
61
Please enter h
1.58
BSA = 5.809307e-02
>> p3anon(95,1.87)

ans =

0.0796

>> p3anon(61,1.58)

ans =

0.0581

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote