What's the best way to open and read a .out file in MATLAB?
117 次查看(过去 30 天)
显示 更早的评论
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!
回答(2 个)
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.
0 个评论
Rahul Gulia
2023-3-8
You can use the function A = importdata(filename)
1 个评论
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 Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!