num2sci

Works just like num2str except will print with formatting in SI prefix notation.
692 Downloads
Aktualisiert 2 Mär 2010

Lizenz anzeigen

Works just like num2str except will print with formatting in SI prefix notation and (optional) units and precision.

Works with arrays of numbers and (potentially) cell arrays of strings for the units, returning a cell array of strings.

Examples:

str = num2sci(165.48e-3) returns str = '165.5 m'
str = num2sci(165.48e-3,'V') returns str = '165.5 mV'
str = num2sci(165.48e-3,'mV') returns str = '165.5 uV'
str = num2sci(165.48e-3,3,'V') returns str = '165 mV'
str = num2sci([1.5 2.5],{'V','mA'}) returns str = {'1.5 V' '2.5 mA'}

Zitieren als

Jason Kaeding (2024). num2sci (https://www.mathworks.com/matlabcentral/fileexchange/26827-num2sci), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2009b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0