intersect between a double and a (complicated) cell array

3 ビュー (過去 30 日間)
Ioannis Vourvachakis
Ioannis Vourvachakis 2021 年 11 月 6 日
コメント済み: Ioannis Vourvachakis 2021 年 11 月 14 日
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 日
編集済み: 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));
  2 件のコメント
Ioannis Vourvachakis
Ioannis Vourvachakis 2021 年 11 月 6 日
Thank you very much!!
Ioannis Vourvachakis
Ioannis Vourvachakis 2021 年 11 月 14 日
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?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by