%Using MATLAB Commands  
%Start by setting PaperUnits to inches.
set(gcf, 'PaperUnits', 'inches');    % Use PaperSize to return the size of the current paper.
papersize = get(gcf, 'PaperSize');
papersize =  8.5000 ,  11.0000;      %Initialize variables to the desired width and height of the figure.
width = 5.5;                         % Initialize a variable for width.
height = 3;                          % Initialize a variable for height.Calculate a left margin that centers the figure horizontally on the paper. 
                                     %Use the first element of papersize (width of paper) for the calculation.
left = (papersize(1)- width)/2;
left =   1.5000;                     %Calculate a bottom margin that centers the figure vertically on the paper. 
                                     %Use the second element of papersize (height of paper) for the calculation.
bottom = (papersize(2)- height)/2;
bottom = 4;                          %Set the figure size and print. 
myfiguresize = [left, bottom, width, height];
set(gcf, 'PaperPosition', myfiguresize);
%print