function [xrect,yrect]=grect(color);
%function [xrect,yrect]=grect(color);
[xrect,yrect]=ginput(2);
xrect(3)=xrect(2);
yrect(3)=yrect(2);
xrect(2)=xrect(1);
xrect(4)=xrect(3);
yrect(4)=yrect(1);
xrect(5)=xrect(1);
yrect(5)=yrect(1);
hold on
if nargin==0
     color='c1';
else
     color=['c',int2str(color)];
end
plot(xrect,yrect,color)
hold off

