intersect between a double and a (complicated) cell array

3 visualizaciones (últimos 30 días)
I have a double array A
and I have a cell array B
I want to extract the values in array A, that also are contained in the sixth column of array B.
Ηow this can be achieved?
  3 comentarios
Ioannis Vourvachakis
Ioannis Vourvachakis el 6 de Nov. de 2021
Editada: Ioannis Vourvachakis el 6 de Nov. de 2021
Yes you are right, the cell entries in the sixth column contain numbers (like the numbers in array A).
Yes, I just want to know the elements of A that appear anywhere in any entry in column 6.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Nov. de 2021
col6_numerics = cell2mat(vertcat(YourCell{:,6}));
A_that_appear = A(ismember(A, col6_numerics));
  2 comentarios
Ioannis Vourvachakis
Ioannis Vourvachakis el 14 de Nov. de 2021
Hello! And if I want to know, the row of B, which elements of A appear in any cell entry in that row of column 6?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by