Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
sizing of animation figures

Subject: sizing of animation figures

From: edward

Date: 5 Aug, 2011 18:31:28

Message: 1 of 2

2 part question
1-trying to have the figure open to the entire size of the screen...i've searched help but can't seem to locate how or examples of how to proceed
2-also want to save the animation figure as an animation so I can play back without having to go into source code...any suggestions?

Subject: sizing of animation figures

From: Image Analyst

Date: 6 Aug, 2011 04:03:10

Message: 2 of 2

"edward":
For part 1:

The official Mathworks recommendation is to use "maxfig" which is located on their web site.
http://www.mathworks.com/support/solutions/en/data/1-3MY8PN/?solution=1-3MY8PN

Then put this code in your outputFcn function (if you're using GUIDE):

% Call special function that The Mathworks gave me to maximize the window and leave it in focus.
% minfig(F,1) % minimizes the figure window for the figure with handle F
% minfig(F,0) % restores figure F if F is minimized
% maxfig(F,1) % maximizes the figure window for the figure with handle F
% maxfig(F,0) % restores figure F if F is maximized s = figstate(F)
% returns the state of figure { Maximized | Minimized | Normal }
% Note: This works only if the window is already displayed. If not, it will throw a java exception.
% The best place to put this is in the yourApp_OutputFcn(),
% which actually gets called as the last thing before your app is made available to the user.
maxfig(handles.figMainWindow, 1) % Maximizes the figure window for the figure with handle in the first argument.

Alternatively you can use this, but it just resizes the window to the full screen - it doesn't actually do a maximize:

% Enlarge figure to full screen.
set(gcf, 'Position', get(0,'Screensize'));

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us