MetricPrefixStr - Print SI Prefix Formatted Numbers

バージョン 1.0.0.0 (1.71 KB) 作成者: Damon Bradley
Prints a SI prefix formatted string corresponding to a numeric vector.
ダウンロード: 492
更新 2013/3/29

ライセンスの表示

Author: Damon Bradley
Purpose: Print out formatted string using SI prefixes to clean up plots
for quantities in the thousands, millions, billions and trillions. This is useful for
publication-quality plots.

Version 1.0, March 28, 2013

INPUTS: xtickvec - Any vector of numbers
OUTPUTS: str - An array of strings with properly formatted numbers

USAGE EXAMPLE:

labels = MetricPrefixStr([1 10 100 33.64 1000 2000 40000 340000 7000000 1e14])

labels =

'1' '10' '100' '33.64' '1k' '2k' '40k' '340k' '7M' '100T'

class labels

ans =

char

引用

Damon Bradley (2024). MetricPrefixStr - Print SI Prefix Formatted Numbers (https://www.mathworks.com/matlabcentral/fileexchange/41000-metricprefixstr-print-si-prefix-formatted-numbers), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2009a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCharacters and Strings についてさらに検索
謝辞

ヒントを与えたファイル: Scientific Prefix to Number, Number to Scientific Prefix

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0