Available under Creative Commons-ShareAlike 4.0 International License.
% This script converts pressures from psi to kPa
% User is prompted to enter pressure in psi
clc % Clear screen
disp('This script converts pressures from psi to kPa:')
disp(' ') % Display blank line
psi=input('What is the pressure value in psi? ');
kPa=psi*6.894757; % Calculating pressure in kPa
disp(' ') % Display blank line
str = ['The converted pressure is: ', num2str(kPa), ' kPa.'];
disp(str);
The script output is as follows:
This script converts pressures from psi to kPa:
What is the pressure value in psi? 150
The converted pressure is: 1034.2135 kPa.
- 1764 reads




