I want this value(3.023155942378474e+42) in title of plot but i want to reduece the length of these charachters i.e. 3.023e+42 !!
let mw know if you happen to know !
thanks

 採用された回答

DGM
DGM 2021 年 6 月 4 日
編集済み: DGM 2021 年 6 月 4 日

0 投票

It all depends on the number format you specify:
mynumber = 3.023155942378474e+42;
title(sprintf('My Number is %.4e',mynumber))
See:

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeNumeric Types についてさらに検索

質問済み:

2021 年 6 月 4 日

編集済み:

DGM
2021 年 6 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by