how can i fix this error?

1 回表示 (過去 30 日間)
Mira le
Mira le 2019 年 10 月 30 日
コメント済み: Mira le 2019 年 10 月 30 日
"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 日
Hi, One way is by using isequal function.
For Example
if isequal(S{p},S{j})

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by