"Undefined operator '==' for input arguments of type 'cell'."
this error appear when I want to compare the similarity between two element in cell like that:
for j=1:numel(S)
if S{p}==S{j}
S{j}={};
end
end
Thanks

2 件のコメント

langrg
langrg 2019 年 10 月 30 日
Hi,
You can replace:
if S{p}==S{j}
by :
if isequal(S{p}, S{j})
Mira le
Mira le 2019 年 10 月 30 日
thank you it works, the execution become low

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

 採用された回答

Sai Bhargav Avula
Sai Bhargav Avula 2019 年 10 月 30 日

1 投票

Hi, One way is by using isequal function.
For Example
if isequal(S{p},S{j})

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

質問済み:

2019 年 10 月 30 日

コメント済み:

2019 年 10 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by