annotate toolboxes/FullBNT-1.0.7/KPMtools/subplot3.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function fignum = subplot3(nrows, ncols, fignumBase, plotnumBase)
Daniel@0 2 % function subplot3(nrows, ncols, fignumBase, plotnumBase)
Daniel@0 3 % Choose a subplot number, opening a new figure if necessary
Daniel@0 4 % eg nrows=2, ncols = 2, we plot on (fignum, plotnum) = (1,1), (1,2), (1,3), (1,4), (2,1), ...
Daniel@0 5
Daniel@0 6 nplotsPerFig = nrows*ncols;
Daniel@0 7 fignum = fignumBase + div(plotnumBase-1, nplotsPerFig);
Daniel@0 8 plotnum = wrap(plotnumBase, nplotsPerFig);
Daniel@0 9 figure(fignum);
Daniel@0 10 if plotnum==1, clf; end
Daniel@0 11 subplot(nrows, ncols, plotnum);
Daniel@0 12
Daniel@0 13