how to delimit the file in matlab?
1 view (last 30 days)
Show older comments
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 Comments
dpb
on 10 Aug 2013
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.
Answers (0)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!