How to make this a real number

4 views (last 30 days)
kyin gab
kyin gab on 30 Nov 2012
Commented: Hasan on 20 Dec 2022
Hello,
My MatLab code outputs this 1.3357e+03 and I think this can be converted to a number like 1335.7.
I would like the MatLab function that will help me convert it.
Thanks for your help.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 30 Nov 2012
x=1.3357e+03;
out=sprintf('%.1f',x)

More Answers (2)

Jurgen
Jurgen on 30 Nov 2012
sprintf?

Walter Roberson
Walter Roberson on 30 Nov 2012
format long g

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!