dat file

조회 수: 1 (최근 30일)
val chrys
val chrys 2011년 2월 19일
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
Jan
Jan 2011년 5월 13일
Is message duplication a new sport?
Walter Roberson
Walter Roberson 2011년 5월 13일
Matt and I did a clean-up sweep of known duplicate messages yesterday.

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

답변 (1개)

Matt Tearle
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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by