MATLAB Answers

Operands to the || and && operators must be convertible to logical scalar values

2 views (last 30 days)
Nick Ware
Nick Ware on 3 Dec 2019
Commented: Nick Ware on 3 Dec 2019
I an writing code and can't figure out why this line of code will not workk. Both sides of the && are either true or false
totalCorners = 0;
threshhold = 200000;
height = size(cornerResponseFunction, 1);
width = size(cornerResponseFunction, 2);
for u = 1:height<=u
for v = 1:width<=v
if ((cornerResponseFunction(u,v) > threshhold) && isLocalMaxB(cornerResponseFunction, u, v))
totalCorners = totalCorners + 1;
cornerList(totalCorners).x = u;
cornerList(totalCorners).y = v;
cornerList(totalCorners).q = q;
end
end
end

  0 Comments

Sign in to comment.

Accepted Answer

James Tursa
James Tursa on 3 Dec 2019
Did you mean this
for u = 1:height<=u
for v = 1:width<=v
to be this
for u = 1:height
for v = 1:width

More Answers (0)

Sign in to answer this question.

Tags