convert integer formats in matlab

2 ビュー (過去 30 日間)
Alireza Lashgary
Alireza Lashgary 2016 年 9 月 17 日
回答済み: Star Strider 2016 年 9 月 17 日
Hi How can i show integer in scientific ? for example i want to show 120 like 1.2*10^2 i want to get 1.2 and 2 ??

回答 (1 件)

Star Strider
Star Strider 2016 年 9 月 17 日
See if this does what you want:
x = 120;
out = [x*10^-floor(log10(x)) floor(log10(x))]
out =
1.2 2

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by