how to shift decimals ? !!

4 次查看(过去 30 天)
pruth
pruth 2021-6-4
编辑: DGM 2021-6-4
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
It all depends on the number format you specify:
mynumber = 3.023155942378474e+42;
title(sprintf('My Number is %.4e',mynumber))
See:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Title 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by