I have a 3476x18x525 matrix named 'weekdata' which I have manipulated as follows to arrive at cell array C.
N = size(weekdata,3);C = cell(1,N);for k = 1:N idx = weekdata(:,3,k)==0 & weekdata(:,4,k)==0 & weekdata(:,5,k)==1 & weekdata(:,6,k)==0; tmp = weekdata(idx,:,k); tmp = sortrows(tmp,8); tmp = tmp(:,2); C{k} = tmp;end
C is a 1×525 cell array that looks something like
C = [725x1 double, 745x1 double, 750x1 double, 732x1 double, etc...]
For each cell, I want to turn each matrix into a uniform 10×1 double, in which each row is the average of 1/10 of the rows, in order to concatenate from a cell array into a single matrix. For example, in C{1,3}, the resulting 10×1 would have (1,1) as the average of rows 1:75, (2,1) has the average of rows 76:150, and so on. However, due to the varying size of the matrices in each cell and because many of those sizes are not divisible by 10, I am not sure if this is possible.
Any ideas are welcome. Thanks.
Best Answer