MATLAB: In Excel divide the single column into three columns

thank you

Hi…In an Excel table, I want to divide the single column into three columns containing data from the first column,Select from A3 the three columns Tide Amplitude Phase
buffer=fileread('RasTanura 1980 AllYear._AnalysisLog.txt');
data= textscan(buffer, '%s %*f %f %f %f %f %f %f','delimiter','#');
data= [data{1},num2cell([data{2:end}])];
xlswrite('RasTanura 1980 AllYear.xlsx',data);

Best Answer

[~, txt] = xlsread('file1.xls');
TAP_cell = regexp(txt(4:29), '(?<Tide>\S+)\s+(?<Amplitude>\S+)\s+(?<Phase>\S+)', 'names', 'once');
TAP = vertcat(TAP_cell{:});
Tides = {TAP.Tide};
Amplitudes = str2double({TAP.Amplitude});
Phases = str2double({TAP.Phase});
JOPR_cells = regexp(txt(35:end), '\s+', 'split');
JOPR_cell = vertcat(JOPR_cells{:});
JOPR = str2double(JOPR_cell);
JDay_LSTs = JOPR(:,1);
Observeds = JOPR(:,2);
Predicteds = JOPR(:,3);
Residuals = JOPR(:,4);