--Creates a tabbed window with an existing figure moved into each tab.
--No tab workarounds necessary - MATLAB's built-in but undocumented tab
features are used for smooth graphics handling and a clean interface.
figHandles: an array of handles to currently valid, visible figures.
These figures can be GUIDE based.
(optional): The handle to the tabbed figure is output if desired.
f1 = figure('Name','Sin Wave');
f2 = figure('Name','Random Points');
f3 = msgbox('A message box');
tabbedFig = figs2tabs([f1,f2,f3])
This code heavily relies on undocumented Matlab functionality.
It has only been tested on Matlab 2012a. Use at your own risk.
--uimenu's are not preserved
--figure-wide callback functions are not preserved, i.e. KeyPressFcn,
--resizing is not proportional (this will be fixed in a future release)
*Not compatible with pre r2010b versions of Matlab, though it could be with
some slight modifications to this function. Compatibility fixes
are welcome from those with older versions.
Chad Smith (2021). figs2tabs - move figures into a single tabbed gui (https://www.mathworks.com/matlabcentral/fileexchange/44747-figs2tabs-move-figures-into-a-single-tabbed-gui), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!