"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 Exchange에서 Data 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