What's the best way to open and read a .out file in MATLAB?

157 visualizaciones (últimos 30 días)
Maggie Fielder
Maggie Fielder el 16 de Ag. de 2019
Comentada: Walter Roberson el 8 de Mzo. de 2023
What's the best way to open and read a .out file in MATLAB? The file has numbers and text and I can open it as a plain text file in MATLAB, but how do I read the data in the file? I've tried fopen and textscan and had no success. Thank you!

Respuestas (2)

per isakson
per isakson el 18 de Ag. de 2019
Editada: per isakson el 19 de Ag. de 2019
If the file contains columns of data, you may want to try the interactive tool Import Data
Notice that this tool can generate code to read files with identical format.

Rahul Gulia
Rahul Gulia el 8 de Mzo. de 2023
  1 comentario
Walter Roberson
Walter Roberson el 8 de Mzo. de 2023
Though I continue to maintain that importdata() is not the "best" call for any purpose. The data type of the output can depend on the contents of the file, so you have to test the actual output to find out what you received.

Iniciar sesión para comentar.

Categorías

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

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by