finding some specific numbers in a numeric cell array
Mostrar comentarios más antiguos
I have a cell array that its cells contain numeric arrays of different sizes. each numeric array contains various number of numbers ranging from 7 to 13. i want to find the number and location of occurrences of all the 7s,8s,9s ...and 13s in the whole cell array. i used the following function:
I = cellfun(@(x) find(x==7), new_data, 'UniformOutput', false);
for finding 7 for example. new_data is my array. i encounter this error after running it:
Undefined function or method 'eq'for input arguments of type 'cell'.
can any body help me in this regard?
2 comentarios
Adam
el 13 de Sept. de 2016
Are you sure you don't have nested cell arrays rather than numeric arrays inside your outer cell array?
Andrei Bobrov
el 13 de Sept. de 2016
Please show small example of your array cells.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Common Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!