Different way of displaying numbers

2 Ansichten (letzte 30 Tage)
kyrresc
kyrresc am 5 Mär. 2016
Beantwortet: kyrresc am 6 Mär. 2016
Hello,
in my code I have numbers like 10^-3. How can I display this in decimal form, i.e 0.001?

Akzeptierte Antwort

Chad Greene
Chad Greene am 5 Mär. 2016
Try this for three decimal places:
num2str(pi,'%0.3f')

Weitere Antworten (1)

kyrresc
kyrresc am 6 Mär. 2016
None of it worked. It's within an sprintf, if that helps.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by