function a = checkrectoverlap(r1, r2)
% returns positive value if two rectangles are overlapped, zero if not.
% r1,r2: [left top right bottom]
rr1=r1-[0 0 r1(1:2)];
rr2=r2-[0 0 r2(1:2)];
a = rectint(rr1,rr2);
% rectangle('Position',rr1);
% rectangle('Position',rr2);
% axis equal
shg #2135() [ Matlab ] Rating1/1=1.00
function a = checkrectoverlap(r1, r2) % returns positive value if two rectangles are overlapped, zero if not. % r1,r2: [left top right bottom] rr1=r1-[0 0 r1(1:2)]; rr2=r2-[0 0 r2(1:2)]; a = rectint(rr1,rr2); % rectangle('Position',rr1); % rectangle('Position',rr2); % axis equalRating1/1=1.00-0+
[ reply ]