How to open files with extensions .fw13 and extension .OUT
조회 수: 3 (최근 30일)
이전 댓글 표시
I want to read some files with extension .fw13 and extension .OUT. I want to read the data from these files and manipulate them. Means I want to see data from all colums and row and later manupulate thes data. How can I do it in MATLAB?
댓글 수: 1
dpb
2019년 5월 29일
The filename/extension is immaterial; all that matters is the format of the data in the files which we've no clue about.
So, show us a description of the file(s) and we can probably at least give some clues...
채택된 답변
추가 답변 (2개)
Gazi Alam
2019년 5월 29일
댓글 수: 7
Walter Roberson
2019년 5월 30일
편집: Walter Roberson
2019년 5월 30일
rmmissing() might help with getting rid of the lines you do not need.
Since you are working with a fixed width object anyhow, combine what you are thinking of as columns 3 and 4 into a single column.
Example: testtable.txt
20190527 1742
20180228 0123
can be read with
filename = 'testtable.txt';
DataStartLine = 1;
NumVariables = 1;
VariableNames(1) = {'dt'};
VariableWidths = [ 13 ];
DataType = {'datetime'};
opts = fixedWidthImportOptions('NumVariables',NumVariables,...
'DataLines',DataStartLine,...
'VariableNames',VariableNames,...
'VariableWidths',VariableWidths,...
'VariableTypes',DataType);
opts = setvaropts(opts,1, 'InputFormat', 'yyyyMMdd HHmm');
T = readtable(filename,opts);
T.dt.Format = 'default';
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!