Good afternoon,
I have been having this probelm all day and I cannot fix it. I am trying to extract the the 3rd column (WaterCumulativeMass) from each of the cell arrays. The problem I am encountering is that the second cell array only contains the headers and no values (which is correct), so to keep consistancy with the other arrays I blank it. This has the effect of turning the cell array into a Struct which I then convert back into a cell array.
The code which works partially (shown) extracts the data from the third column of cell array but combines it into a single column vector where I would like it as columns like it would normally do in a matrix for anything involving a loop function with counter. If I were to use anything with a counter i.e. ABC(i) = array{i}.data(:,3) it states that the left and right sides are not equal or the dot function is not applicable to this etc.
I have tried extracting the data from the struct format aswell but this again will not work
Can someone help please?
% Partially successful cell array method
CC = mydata_EL;CC{2} = [];for i = 3:numel(CC); % Needs to start at 3rd column because of the blanks
ABC = CC{i}.data(:,3)% Does extract 3rd columns. Creates a single vector
%ABC(i) = CC{i}.data(:,3) # Does not work with the counter
end
Best Answer