Unit converter package

Includes common STEM unit conversions. Easily expandable by user - define one new unit pair to get conversions with all other units.
1 Download
Updated 18 Aug 2025

View License

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 (2026). 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 Linux
Version Published Release Notes
1.0.0