Mercurial > hg > camir-ismir2012
annotate toolboxes/FullBNT-1.0.7/KPMtools/subplot2.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 subplot2(nrows, ncols, i, j) |
Daniel@0 | 2 % function subplot2(nrows, ncols, i, j) |
Daniel@0 | 3 |
Daniel@0 | 4 |
Daniel@0 | 5 sz = [nrows ncols]; |
Daniel@0 | 6 %k = sub2ind(sz, i, j) |
Daniel@0 | 7 k = sub2ind(sz(end:-1:1), j, i); |
Daniel@0 | 8 subplot(nrows, ncols, k); |
Daniel@0 | 9 |
Daniel@0 | 10 if 0 |
Daniel@0 | 11 ncols_plot = ceil(sqrt(Nplots)); |
Daniel@0 | 12 nrows_plot = ceil(Nplots/ncols_plot); |
Daniel@0 | 13 Nplots = nrows_plot*ncols_plot; |
Daniel@0 | 14 for p=1:Nplots |
Daniel@0 | 15 subplot(nrows_plot, ncols_plot, p); |
Daniel@0 | 16 end |
Daniel@0 | 17 end |