convert integer formats in matlab

1 visualización (últimos 30 días)
Alireza Lashgary
Alireza Lashgary el 17 de Sept. de 2016
Respondida: Star Strider el 17 de Sept. de 2016
Hi How can i show integer in scientific ? for example i want to show 120 like 1.2*10^2 i want to get 1.2 and 2 ??

Respuestas (1)

Star Strider
Star Strider el 17 de Sept. de 2016
See if this does what you want:
x = 120;
out = [x*10^-floor(log10(x)) floor(log10(x))]
out =
1.2 2

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by