Page 1 of 1

Coding Language: Matlab Normal atmospheric pressure is defined as 1 atmosphere [atm]. 1 [atm] = 14.6956 [psi] = 760 [tor

Posted: Tue Jul 12, 2022 8:16 am
by answerhappygod
Coding Language: Matlab
Normal atmospheric pressure is defined as 1 atmosphere [atm]. 1 [atm] = 14.6956 [psi] = 760 [torr] = 101.325 [kPa*].
1) Write a function, fn_psi2atm to convert psi to atm, torr and kPa. Set the output as 3 different unit with input of pressure in psi.
2) Write a script, to do the following work.
2-a. Read an external data Time Pressure.txt. by using fgetl, fscanf and textscan. You may combine those functions to read header lines separately, but do not use other functions to read the data.
Coding Language Matlab Normal Atmospheric Pressure Is Defined As 1 Atmosphere Atm 1 Atm 14 6956 Psi 760 Tor 1
Coding Language Matlab Normal Atmospheric Pressure Is Defined As 1 Atmosphere Atm 1 Atm 14 6956 Psi 760 Tor 1 (19.89 KiB) Viewed 26 times
2-b. Convert the pressure unit by using fn_psi2atm.
2-c. Use pressure unit of [atm]. Fit the data with linear and a third-degree polynomial by using polyfit. Use sprintf to store the fitted result.
2-d. Use subplot. In the first plotting area, plot time vs pressure in kPA unit. In the second plotting area, plot the data points in atm along w/ the fitted result.
Please use MATLAB to make the function & script with the given instructions.
time(sec) 12345678910​ Pressure(psi) 25.927.028.229.029.830.631.131.531.030.5​​