.DAT file
7 次查看(过去 30 天)
显示 更早的评论
I have data that is in a .DAT format. The file contains header information about the test that was run and contains text and numbers. The data located below the header information and has two lines of text (data name and units below), then the numerical data is located below the units. The data is in columns and can vary in length depending on how long the data was recorded for. I would like to be able to separate out the header information from the data. I'm a newbee to MATLAB, so I'm grasping at how this can be done. I would normally use excel, however, there are at times more than 30k lines of data and excel cannot plot all the data easily. Thanks ! Sincerely, Bill D.
1 个评论
Walter Roberson
2011-11-21
There is no standard format for .DAT Files; as a file extension, it can mean anything. You will have to provide us with basic information about the file format including whether the numeric data is represented as text.
回答(3 个)
Fangjun Jiang
2011-11-7
Provide a snip of your example .dat file will be helpful. Check out the function textscan(), it can skip header lines. For some files, you might be able to use importdata() and uiimport(). Once you went through one example, uiimport() can generate the necessary code to do the import in automation.
0 个评论
William Du Chene
2011-11-18
4 个评论
Fangjun Jiang
2011-11-21
Is the number of lines fixed for the header section? How many columns are there for the data section? These are the basic question need to be clarified before anyone can help you.
Walter Roberson
2011-11-21
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
另请参阅
类别
在 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!