File Exchange

image thumbnail

Fundamental Physical Constants and Unit Conversion in SI (MKS) & Gaussian (CGS) Units

version 1.0 (13.2 KB) by

Create structs with physical constants and conversion factors to other units in MKS & CGS units.

1 Download

Updated

View License

Modified version of Rob deCarvalho's "Simple Units and Dimensions for Matlab" See http://www.mathworks.com/matlabcentral/fileexchange/9873 for original units.m

Comments and Ratings (3)

Carl Witthoft

Nice, if a bit complicated with the "XX.YY.ZZ" naming. For those interested solely in values of fundamental constants, try my "fundy," 54096, which accepts names of the constants as inputs.

Todd

Todd (view profile)

Also, I would suggest adding radians (rad = m.m/m.m;), and changing Hz = 2*pi rad/s. Isn't rad/s more consistent than Hz most of the time?

You could also add:
%---- angle ----
m.rev = 2*pi * m.rad; % revolutions
m.deg = pi/180 * m.rad; % degrees

%---- frequency ----
m.rpm = m.rev/m.min; % revolutions per minute

%---- flow ----
m.lpm = m.L/m.min; % liters per minute
m.gpm = m.gal/m.min; % gallons per minute

Todd

Todd (view profile)

This is a great update to a tool I've used frequently. I like the innovation of programmatically adding the prefix units. Thank you!

There is a bug in this part: there are no prefix H units, because the min and max are switched.

Updates

1.0

bsd license

MATLAB Release
MATLAB 7.7 (R2008b)
Acknowledgements

Inspired by: Simple Units and Dimensions for Matlab

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video