%--------------------------------------------------------------------%
% Alison Chaiken, sole author and maintainer %
% ------------------------------------------------------ %
% GUI-based Matlab and FEMLAB data analysis, instrument %
% control, statistical analysis, finite-element modelling, %
% image acquisition and analysis %
% ------------------------------------------------------- %
% alchaiken@gmail.com %
% http://www.exerciseforthereader.org/ %
% (001)650-279-5600 %
%--------------------------------------------------------------------%
% Move current window to the center of the screen
% 0 is the root window, that is, the screen
ScreenSize=get(0,'ScreenSize');
% OuterPosition includes title bar and other such decorations
WindowGeometry=get(gcf,'OuterPosition');
centerX = ScreenSize(3)/2;
centerY = ScreenSize(4)/2;
set(gcf,'Position',[(centerX - 0.5*WindowGeometry(3)) ...
(centerY - 0.5*WindowGeometry(4)) WindowGeometry(3) WindowGeometry(4)])