image thumbnail

getfignum(n_request​ed)

version 1.0.0.0 (1.02 KB) by Rik
Find a figure number that is unused

16 Downloads

Updated 08 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 (2021). 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!