Code covered by the BSD License
4.0
by Federico Forte
29 Nov 2006 (Updated 29 Nov 2006)
Convert number to eng. notation string, with SI prefixes
| Watch this File
Convert numbers to engineering notation strings, with prefixes from International System of Units (SI). Examples: - num2eng(23e8) produces the string '2.3G' - num2eng(0.0000004) produces the string '400n'
Good job. Maybe some checking instructions are needed. It would be nice if you also submitted the "opposite" function eng2num!.
A similar funtion can found at : http://www.mathworks.com/matlabcentral/fileexchange/20950-num2str-with-metric-prefix which have spacing between the SI-prefix and number, (as it should have).
Contact us at files@mathworks.com