function imgrot_test(X)
%IMGROT_TEST  Test execution speed of Matlabs default image rotation and the
%	rotation algorithm imgrot.
%
%	imgrot_test test the methods with the `clown' image
%
%	imgrot_test(X) test the methods with the image X

if nargin<1,
  load clown
end
for Angle=[0 pi/16 pi/8 pi/6 pi/4 pi/2 3*pi/2],
  c0=clock; y=imrotate(X,Angle); t1=etime(clock,c0);
  c0=clock; y=imgrot(X,Angle);   t2=etime(clock,c0);
  fprintf(1,'Angle=%3.2fpi: imrotate %3.2f, imgrot %3.2f\n',...
      Angle/pi,t1,t2);
end

