nextFig.m 363 B

12345678910111213141516171819
  1. % nextFig (MAXFIGS, SKIP)
  2. %
  3. % Make figure number mod((GCF+SKIP), MAXFIGS) the current figure.
  4. % MAXFIGS is optional, and defaults to 2.
  5. % SKIP is optional, and defaults to 1.
  6. % Eero Simoncelli, 2/97.
  7. function nextFig(maxfigs, skip)
  8. if (exist('maxfigs') ~= 1)
  9. maxfigs = 2;
  10. end
  11. if (exist('skip') ~= 1)
  12. skip = 1;
  13. end
  14. figure(1+mod(gcf-1+skip,maxfigs));