MATLAB: Get index of smallest vlaue in each cell of cell array

cell arraysfindmin

I have a cell array with e.g. 40×1 cell and I want for each cell the index of the smallest value. i think smth like find(min(..)). but when i try it with this i allways get the index 1 …thank you for your help

Best Answer

Let cell_array - your cell array (40 x 1).
cellfun(@(x)find(min(x) == x),cell_array)