You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: scn_export_spm_window.m
    path of file: ./repos/CanlabCore/CanlabCore/Visualization_functions
    
    the code of the file until where you have to start completion: % :Usage:
% ::
%
%    scn_export_spm_window(meth, [savefilename] or [overlay])
%
% Modes:
%   - scn_export_spm_window('setup')
%   - scn_export_spm_windo
    
function scn_export_papersetup
    % make sure that min size of fig. is 400 pixels
    sz = get(gcf, 'Position');
    sz = sz(3:4);   % width and height
    szratio = max(sz) ./ min(sz);   % max to min size
    wh = find(sz == min(sz));
    sz(wh) = 400;
    wh = find(sz == max(sz));
    sz(wh) = 400 * szratio;

    % set paper size using current screen
    set(gcf, 'PaperUnits', 'points', 'PaperPosition', [0 0 sz], 'PaperType', 'usletter');
end