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

In matlab code The body surface area (BSA) of a person (used for determining dos

ID: 3789057 • Letter: I

Question

In matlab code

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 P3file 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

a-> Anonymous function to calculate the BSA

  p3anaon=@(w,h)(0.007184*(w^0.425)*h^0.75);

H=input(' ');
W=input(' ');
disp(p3anaon(H,W));

b-> To writa a function in file put this code in the file names P3file.m :

function f = fact(W,H)
f = prod(0.007184*(w^0.425)*h^0.75);
end

c-> BSA of person A using function : 0.28523 (Same when calculated with the file function)

BSA of person B using function : 0.19046 (Same when calculated with the file function)

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