Write a MATLAB function called bodySurfaceArea that takes tw

Write a MATLAB function called bodySurfaceArea that takes two inputs mass (in kg) and height (in cm) and computes the body surface area (BSA) of a person in m2. BSA can be calculated using the Du Bois formula For example, the BSA of a person with a height of 187 cm and a mass of 75 kg would be calculated as 2.2759 m2. Next write a function called bodySurfMat that accepts a 2-column array as input. The first column contains values of mass in kg and the second column contains corresponding heights in meters. Your function must use bodySurfaceArea to compute the corresponding value of BSA for each mass-height pair of values. It should return a 3-column array with the mass, height, and BSA values in the respective columns. Include help comments and other descriptive comments in both functions, and ensure that they do not accept nonsensical input.

Solution

The body surface area (BSA) in m^2 of a person can be caluclatedby the formula:

BSA (m2) = 0.20247 x Height(m)0.725 x Weight(kg)0.425

BSA (m2) = 0.007184 x Height(cm)0.725 x Weight(kg)0.425

Height=180cm;

mass=75kg

in which W is hte mass in kg and H is the height in cm

Script of function

useBSA=BodySurA(w,h)   

The input arguements w and h are the mass andheight respectively

w=75kg;

h=180cm;

for i=1:2.2759
  BSA=0.007184*W^0.425*H^0.75
fprintf(\'%x. BSA for W=%x and H=%.xx xx:%x x\',(x), W(i), H(x),BSA);
end--------------------------------------------OUTPUTx. BSA xxx W=xx xxx H=1.87is:0.079576

Body surface Mat

BSA = 0.016667 × W0.5 × H0.5

BSA=BodySurA(w,h)

w=75kg;

h=180cm;

for 1=1:n

BSA = 0.016667 × 75^0.5 × 180^0.5

fprintf(\'BSA=%d\',BSA);

end

and also we use java script ike

Write a MATLAB function called bodySurfaceArea that takes two inputs mass (in kg) and height (in cm) and computes the body surface area (BSA) of a person in m2.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site