using fprintf with scientific notation

129 visualizaciones (últimos 30 días)
Samuel Trinidad-Espinoza
Samuel Trinidad-Espinoza el 27 de Feb. de 2018
Respondida: Voss el 26 de Dic. de 2023
What commands can I use to get +1.01325E+05 and 3.381400e+01? I know it involves %E and %e but i don't know in what order i should use them in.

Respuestas (1)

Voss
Voss el 26 de Dic. de 2023
x = 101325;
y = 33.814;
fprintf('%+.5E',x)
+1.01325E+05
fprintf('%+.6e',y)
+3.381400e+01

Categorías

Más información sobre Language Fundamentals 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