How to make this a real number

2 visualizzazioni (ultimi 30 giorni)
kyin gab
kyin gab il 30 Nov 2012
Commentato: Hasan il 20 Dic 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.

Risposta accettata

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

Più risposte (2)

Jurgen
Jurgen il 30 Nov 2012
sprintf?

Walter Roberson
Walter Roberson il 30 Nov 2012
format long g

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by