필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Undefined operator '>' for input arguments of type 'cell'. Error in sif (line 374) if (hist(i,1)> a)

조회 수: 1 (최근 30일)
amal abbbes
amal abbbes 2018년 2월 25일
마감: MATLAB Answer Bot 2021년 8월 20일
for l=1:siz
hist=rt(l);
max=[1 hist(1,1)];
for i=1:36
a=max(2);
if (hist(i,1)> a)
max= [i hist(i,1)];
end
end
  댓글 수: 1
amal abbbes
amal abbbes 2018년 2월 25일
je peut pas vraiment comprendre pourquoi cette erreur ?

답변 (1개)

dpb
dpb 2018년 2월 25일
Apparently rt is a cell array containing a cell. Hence need to "use the curlies, Luke!" to dereference the content. Try
if hist{i,1}>a
instead.
NB: However, I strongly suggest to use a different variable name than hist; hist is a builtin Matlab histogram function that you've aliased here...
>> which hist
C:\ML_R2016b\toolbox\matlab\datafun\hist.p
>>
For a more precise answer would need to see result of
whos rt
and
whos hist
to see the actual storage pattern.
  댓글 수: 2
amal abbbes
amal abbbes 2018년 2월 26일
편집: amal abbbes 2018년 2월 26일
j'ai essaye avec votre méthode mais il ya a une autre erreur qui s'affiche malgré que j'ai bien vérifie les boucles et les dimension des matrices Index exceeds matrix dimensions.
dpb
dpb 2018년 2월 26일
Show code and results as requested with any error in context...no can see your terminal from here.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by