MATLAB: How to find index of a value in cell array

cell arrays

I have this Cell Array ‘A’ of size 3 by 7
A = { 3 4 [] [] [] [] []
2 6 -2 2 -2.1 2 2
-5 -5 25 1 [] [] []}
I want to find index of ‘6’ element in 2nd row and 2nd column The answer shall be row = 2 and column = 2

Best Answer

isSix = cellfun(@(x)isequal(x,6),A);
[row,col] = find(isSix);