Create a script file that will accept a value in metric units (mass in kgs, and volume in cubic meter) and will output the equivalent density in lb/cu.ft.

1 Ansicht (letzte 30 Tage)
Create a script file that will accept a value in metric units (mass in kgs, and volume in cubic meter) and will output the equivalent density in lb/cu.ft.
M = input('mass [kgs.]: ');
V = input('volume [cu.m.]: ');
u = symunit;
p = (M*u.lbm)/(V*u.cft);
Is this the correct way to answer this question?

Akzeptierte Antwort

Matt J
Matt J am 29 Sep. 2021
You don't need symunit. It's just
P=M/V

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by