Hi, I am attempting to calculate the mean of all the rows in a cell array called 'XTrain2_all' comprised of 4×30 doubles, however I keep getting NaN values instead of 4 mean values. The same happens when computing the standard deviation. How do I stop this from happening? Thanks in advance.
XV = [XTrain2_all{:}];mu = mean(XV,2);sg = std(XV,[],2);
Best Answer