MATLAB: Find index of cells containing other cells

find in a cell

Hello,
I have a cell A of a size 1×9 and each of the 9 cells contains a cell 1xNumber, where Number is different for each of the 9 cells. E.g A{1,5} contains 1×100 cell and e.g A{1,5}{1,44} contains a number: 0.842. Now, I want to find the position of a fixed number, let's say 0.842. I want to search within all the cells. I checked manually and the number 0.842 is A{1,5}{1,44}. So as an output I want matlab to give me the numbers 5 and 44.
I tried with:
index = find([A{:}] == 0.824);
I'm getting an error:
Undefined function 'eq' for input arguments of type 'cell'.
I guess it's because my cell A contains cells…
Any help appreciated,
Thank you

Best Answer

I don't know why you don't just avoid the problem in the first place. I don't see any reason why the data in the cells needs to also be cells. Why not use just regular numerical arrays? So the cells contain arrays of doubles instead of other cells?