Unit converter package
Version 1.0.0 (7.65 KB) by
Chris Wilkening
Includes common STEM unit conversions. Easily expandable by user - define one new unit pair to get conversions with all other units.
Standalone MATLAB files to do common STEM unit conversions.
Conversion files included those for: Distance, Angles, Power, Area, Volume, Time, Speed, Digital storage, Pressure, Mass, Frequency, Force, Energy.
Usage format:
distanceInMeter = unit.len.ft_to_m(1.234);
Within conversion files (e.g., ft_to_m.m) are:
- Numerical conversion factor
- Step-by-step conversion details
- Data sources
- Full unit names
- Notes
Every conversion file is fully self-contained, runs quickly and without further function calls.
Adding new units:
- Only one relation to an existing unit must be specified
- Example: to add "rods" (1 rod = 16.5 ft) to length conversions:
- >> Add a single "rods = f(feet)" definition.
- >> Re-run makeUnitConversionsFiles.m.
- Conversions to/from rods will be automatically created for all other length units.
- See files in +numericalDataTrees for details.
Local verification of conversions done with checkUnitsConversionFiles.m.
Keywords: units, conversion, converter
Cite As
Chris Wilkening (2025). Unit converter package (https://uk.mathworks.com/matlabcentral/fileexchange/181826-unit-converter-package), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
