Make matlab write to a text file WITHOUT scientific notation.

49 visualizaciones (últimos 30 días)
H R
H R el 4 de Dic. de 2019
Respondida: Walter Roberson el 4 de Dic. de 2019
Hi there,
I have a matrix say 5*5. The matrix contain some numerical values with many digists shown in scientific notation.
I would like to write this matrix to a text file without any scientific notation. Using "format long " only changes the display and matlab still writes in scientific notation to the text file.
How can i fix this ?

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Dic. de 2019
You can use dlmwrite() and pass in a 'precision' option that is a character vector representing a % format. For example, you could use '%13.6f' if you wanted at least 13 total locations with 6 after the decimal point.

Categorías

Más información sobre Data Import and Export en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by