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

156 ビュー (過去 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 Center および File ExchangeData 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