フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i compare beteween two elements the first is cell and the second vector or class double in matlab?

1 回表示 (過去 30 日間)
Mira le
Mira le 2019 年 10 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Example:
S= {1 2 }
q= [ 1 2 3]
how compare each element of q exisit in S?

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 10 月 29 日
In the special case where each entry in S is a scalar, then
ismember(q,cell2mat(S))
If that is not the case, if S entries can be non-scalars, then you need to define what it means for there to be a match. For example, if S = {[1 2], 3} then should entries 1 and 2 match because they are somewhere in S, or should only 3 match because it is exactly the same as an entry in S ?

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by