function [] = figure_size(width,height,units); %function [] = figure_size(width,height,units); % % Sets figure size in matlab to be the size you want when printed. % WIDTH = width of figure % HEIGHT = height of figure % UNITS = 'pixels' or 'inches', and gives the units for WIDTH % and HEIGHT % Ramzi Mirshak - ramzi@dal.ca - 25Jun2006 set(gcf,'units',units); set(gcf,'position',[1 1 width height]); pos = get(gcf,'position'); ppos = get(gcf, 'paperposition'); ppos(3:4) = pos(3:4); set(gcf,'paperposition',ppos); set(gcf,'paperpositionmode','manual');