Hi,
I have a structure that looks like this:
% Create table
Name = {'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'}.';Month = [1, 2, 3, 1, 2, 3, 1, 2, 3].';Lat = [49, 50, 51, 52, 53, 54, 49, 50, 51].'; Lon = [-99, -100, -101, -102, -103, -104, -99, -100, -101,].';A = [0.1, 0.2 , 0.3, 1.1, 0.9, 1.0, 0.1, 0.2 , 0.3,].';T = table(Name, Month, Lat, Lon, A); % Convert to structure
t2 = varfun(@(x){x(:)'},T,'GroupingVariables','Name');TinStrr = t2(:,[1,3:end]);TinStrr.Properties.VariableNames = T.Properties.VariableNames;S_out = table2struct(TinStrr);
This creates a 3×1 structure. How do I change that to a 1×3 structure ?
Thank you
Best Answer