getfignum(n_request​ed)

Version 1.0.0.0 (1.02 KB) by Rik
Find a figure number that is unused
17 Downloads
Updated 8 Feb 2017

View License

Sometimes you need a fresh figure, but you want to control/save the figure number. This script retrieves the list of opened figure windows and finds n_requested unused figure numbers.
This code is written to be portable over OS (Windows/Mac/Unix) and platform (Matlab/Octave). It should work on just about any version.

Cite As

Rik (2024). getfignum(n_requested) (https://www.mathworks.com/matlabcentral/fileexchange/61505-getfignum-n_requested), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0