필터 지우기
필터 지우기

how to delimit the file in matlab?

조회 수: 3 (최근 30일)
sandy
sandy 2013년 8월 8일
end hi ..I NEED to append the .run files to excel file.the data inside each .run file will be like below,
ex:
SAMPLE_20120807_1806 0 +1.122117E+1 +7.190077E+0 +1.460343E+1 +1.352402E+0 +1.116599E+1
i done appending.but in the output excel file,the above line are stored in first cell itself(1*1).its not delimited. i am stuck with this delimit for my input file. delimiting my above examples is possible in matlab? help me ..
if true
pathName = 'C:\Temp';
fileList = dir(fullfile(pathName, '*.run'));
out = fopen(fullfile(pathName, 'append.xls'), 'w');
for k = 1:numel(fileList)
s = fileread(fullfile(pathName, fileList(k).name));
fwrite(out, s, 'char');
end
fclose(out)
end
  댓글 수: 3
sandy
sandy 2013년 8월 10일
It's a tab separated text file.
dpb
dpb 2013년 8월 10일
doc dlmwrite
NB: if you're trying to append to an existing file, be sure the fopen argument is for append or use fseek to position at end before writing or you'll overwrite the existing file content.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by