createFullScreenFig.m 455 B

12345678910111213
  1. %% Create a figure big enough to fill almost whole (secondary) monitor.
  2. function hFig = createFullScreenFig
  3. graphicsRoot = groot;
  4. if size(graphicsRoot.MonitorPositions, 1) == 2
  5. monitorPos = graphicsRoot.MonitorPositions(2, :);
  6. elseif size(graphicsRoot.MonitorPositions, 1) == 1
  7. monitorPos = graphicsRoot.MonitorPositions(1, :);
  8. end
  9. figPos = [monitorPos(1:2) + 10 (monitorPos(3:4) - 100)];
  10. hFig = figure('Position', figPos); % My pc.