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));