From 90b6fda1ae71545a64451c42cf2be7f03e94e568 Mon Sep 17 00:00:00 2001 From: dskkato <kato.daisuke429@gmail.com> Date: Sun, 19 Jun 2022 18:10:12 +0900 Subject: [PATCH] fix gcf usage Starting in MATLAB R2014b, figure handles are object handles where previously they were integers. Now to get the associated number for the figure, query the new Number property. See more information below. https://jp.mathworks.com/matlabcentral/answers/157757-how-do-i-get-the-figure-number-in-matlab-r2014b --- nextFig.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextFig.m b/nextFig.m index e0ac73f..39e0b71 100755 --- a/nextFig.m +++ b/nextFig.m @@ -16,4 +16,5 @@ function nextFig(maxfigs, skip) skip = 1; end -figure(1+mod(gcf-1+skip,maxfigs)); +figNumber = get(gcf, 'Number'); +figure(1+mod(figNumber-1+skip,maxfigs));