Mercurial > hg > mauch-mirex-2010
annotate _FullBNT/KPMtools/subplot3.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function fignum = subplot3(nrows, ncols, fignumBase, plotnumBase) |
matthiasm@8 | 2 % function subplot3(nrows, ncols, fignumBase, plotnumBase) |
matthiasm@8 | 3 % Choose a subplot number, opening a new figure if necessary |
matthiasm@8 | 4 % eg nrows=2, ncols = 2, we plot on (fignum, plotnum) = (1,1), (1,2), (1,3), (1,4), (2,1), ... |
matthiasm@8 | 5 |
matthiasm@8 | 6 nplotsPerFig = nrows*ncols; |
matthiasm@8 | 7 fignum = fignumBase + div(plotnumBase-1, nplotsPerFig); |
matthiasm@8 | 8 plotnum = wrap(plotnumBase, nplotsPerFig); |
matthiasm@8 | 9 figure(fignum); |
matthiasm@8 | 10 if plotnum==1, clf; end |
matthiasm@8 | 11 subplot(nrows, ncols, plotnum); |
matthiasm@8 | 12 |
matthiasm@8 | 13 |