How to find the position in cell arry?
Mostrar comentarios más antiguos
Hi
I have cell array data example. D = {[1 2];[1 4];[1 6];[2 4];[2 5];}
I want to find the position of [1 6] in that D, and the answer is 3.
I try this command
suppose c = [1 6]
cellfun(@(x) ismember(x,c),D,'UniformOutput',false)
and the output is below
[0] [0] [1] [0] [0]
but I want the answer is 3
how to do it?
thank you
Respuesta aceptada
Más respuestas (1)
alice
el 25 de Jun. de 2012
0 votos
Categorías
Más información sobre Structures 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!