function defaultPosition = getDefaultPosition(wh)
%GETDEFAULTPOSITION Get position to render GUI at center of the screen

%   Copyright 2010-2011 The MathWorks, Inc.

if nargin < 1
    wh = [410 300];
end

oldUnits = get(0, 'Units');
set(0, 'Units', 'pixels');
screen = get(0, 'ScreenSize');
set(0, 'Units', oldUnits);

defaultPosition = [screen(3)/2-wh(1)/2 screen(4)/2-wh(2)/2 wh];

% [EOF]
