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

조회 수: 158 (최근 30일)
Maggie Fielder
Maggie Fielder 2019년 8월 16일
댓글: Walter Roberson 2023년 3월 8일
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!
  댓글 수: 1
Star Strider
Star Strider 2019년 8월 16일
Attach it here.
the readtable function is also an option.

댓글을 달려면 로그인하십시오.

답변 (2개)

per isakson
per isakson 2019년 8월 18일
편집: per isakson 2019년 8월 19일
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 2023년 3월 8일
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 3월 8일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by