Effacer les filtres
Effacer les filtres

how can i fix this error?

1 vue (au cours des 30 derniers jours)
Mira le
Mira le le 30 Oct 2019
Commenté : Mira le le 30 Oct 2019
"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 commentaires
langrg
langrg le 30 Oct 2019
Hi,
You can replace:
if S{p}==S{j}
by :
if isequal(S{p}, S{j})
Mira le
Mira le le 30 Oct 2019
thank you it works, the execution become low

Connectez-vous pour commenter.

Réponse acceptée

Sai Bhargav Avula
Sai Bhargav Avula le 30 Oct 2019
Hi, One way is by using isequal function.
For Example
if isequal(S{p},S{j})

Plus de réponses (0)

Catégories

En savoir plus sur Operators and Elementary Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by