Advanced mean in cell arrays
1 ビュー (過去 30 日間)
this is a similar question to one I assked before. But it actualy diffes for a key detail so II opened a new issue.
so say I havve a cell array having 3 arrays each containing a 4x3 matrix (my original one has 150 matrices of size 11x75). The matrices have on the thid column an identifier of pprooducts and on the other two collumns sales values for a certain country (col name). Say I would like to do the mean of the sales for each product foorr each country so that I will avverage onlyh the values of products with the same identifier. So say I have a cell array containing matrices (where the bold elements are the identifiers):
cell1 = [1,2,3,9 ;4,8,7,4]
cell2 = [13,3,64,6;71,8,59,4]
cell3 = [31,43,54,9;41,18,17,1]
% Expected result:
mean for prod 6 in each column ; mean for prod 1 in each column ...] where mean for prod 6 (or 1) in each column in this toy example iss the same as the values of each entry since they apppear only once.