intersect between a double and a (complicated) cell array

3 次查看(过去 30 天)
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 个评论
Ioannis Vourvachakis
编辑:Ioannis Vourvachakis 2021-11-6
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.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2021-11-6
col6_numerics = cell2mat(vertcat(YourCell{:,6}));
A_that_appear = A(ismember(A, col6_numerics));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by