num2sci

Works just like num2str except will print with formatting in SI prefix notation.
692 téléchargements
Mise à jour 2 mars 2010

Afficher la licence

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'}

Citation pour cette source

Jason Kaeding (2024). num2sci (https://www.mathworks.com/matlabcentral/fileexchange/26827-num2sci), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2009b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Characters and Strings dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0