Pressure in U.S. customary units is measured in psi (pound per square inch). In SI metric units pressure is measured in Pa (N/m2). Write a user-defined MATLAB function that converts pressure given in units of psi to pressure in units of Pa. For the function name and arguments, use [Pa] = Psi-ToPa(psi). The input argument psi is the pressure in units of psi to be converted, and the output argument Pa is the converted pressure in units of Pa (rounded to the nearest integer). Use the function in the Command Window to: (a) Convert 120 psi to units of Pa. (b) Convert 3,000 psi to units of Pa.

Respuesta :

Answer:

Check below for answers

Explanation:

Matlab code:

function[Pa] = Psi-ToPa(psi)

        Pa = psi * 6894.75728;

end

a) To convert 120 psi to units of Pa, just call the function Pa using the command:

          Psi-ToPa(120)

ans =

       8.2737e+05

b) To convert 3000 psi to units of Pa, just call the function Pa using the command:

          Psi-ToPa(3000)

ans =

       2.0684e+07