Stds=cellfun(@std ,ratios,'UniformOutput',false); % trying to calculate standard dev for cells for cell array 'ratios' that have 20 elements. All other cells should give 0.
MATLAB: My cell array has 861 rows and each row has vectors of varying sizes. I want to calculate std dev only for cells that have 20 elements. Others should give a value of 0. How to tell cellfun to get only the cells with 20 elements. Here is the attempt
conditions on cellfun
Best Answer