Info
此问题已关闭。 请重新打开它进行编辑或回答。
Undefined operator '>' for input arguments of type 'cell'. Error in sif (line 374) if (hist(i,1)> a)
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
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 个评论
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!