Downloading text files from Matlab causes them to be corrupted

5 visualizaciones (últimos 30 días)
From my matlab program, I have saved a number of variables (128x128 matrices) as text files. When I open them on matlab itself (Matlab online r2020a), they open fine and display the numeric data I want. However when I download them, either individually or in bulk as a zip file, the .txt files display only junk values, when opened in Notepad. Why could this be happening and what is the fix?
Attaching a screenshot of the files viewed in program, and after download:

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Jul. de 2020
Don't use Notepad. Use Notepad++ or any editor created in the last 20 years. Notepad is so old it is only able to properly handle files that have both carriage return and newline at the end of each line; the files you are downloading have linefeeds but no carriage returns.
  1 comentario
Pranav Krishnan
Pranav Krishnan el 4 de Jul. de 2020
Thank you! Didn't know the fix was as simple as that, but sometimes it's a relief to have a simple answer!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by