function printmodel(filename,format)
%PRINTMODEL - save an image of current figure
%
%   the format is the same as the one accepted by the builtin imwrite routine.
%
%   Usage:
%      printmodel(filename,format)

frame=getframe();image=frame2im(frame);
imwrite(image,filename,format);
