how to split the string to cells?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
i have a text file contains following data,
SAMPLE_20120807_1806 0 +1.122117E+1 +7.190077E+0 +1.460343E+1
..i opened this and,but the output variable stored this line in a single cell itself like this (1*234 char).but i need to split each and values to be stored in separate cells in excel file...i stuck here..can anyone suggest code there in matlab?
%if true
folder='F:\run\';
file=fullfile(folder,'SAMPLE_20120807_1806.run');
a=fileread(file);
dlmwrite('file.xls',a,'');
%end
Akzeptierte Antwort
Azzi Abdelmalek
am 12 Aug. 2013
s='SAMPLE_20120807_1806 0 +1.122117E+1 +7.190077E+0 +1.460343E+1'
regexp(s,' ','split')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!