dat file
12 ビュー (過去 30 日間)
古いコメントを表示
how do I read a dat file into matlab ? i have a dat file with 5 columns of numbers and i want to read column one and column five thank you in advance
3 件のコメント
Walter Roberson
2011 年 5 月 13 日
Matt and I did a clean-up sweep of known duplicate messages yesterday.
回答 (1 件)
Matt Tearle
2011 年 2 月 19 日
I'm going to assume that you're talking about a text data file. In that case, use textscan:
fid = fopen('filename.dat');
Data = textscan(fid,'%f%*f%*f%*f%f');
fclose(fid);
You may need to specify other options to textscan, depending on your file formatting (header lines, delimiters, etc).
If the file is binary, then see Walter's answer to #1632
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!