annotate toolboxes/FullBNT-1.0.7/KPMtools/subplot2.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function subplot2(nrows, ncols, i, j)
wolffd@0 2 % function subplot2(nrows, ncols, i, j)
wolffd@0 3
wolffd@0 4
wolffd@0 5 sz = [nrows ncols];
wolffd@0 6 %k = sub2ind(sz, i, j)
wolffd@0 7 k = sub2ind(sz(end:-1:1), j, i);
wolffd@0 8 subplot(nrows, ncols, k);
wolffd@0 9
wolffd@0 10 if 0
wolffd@0 11 ncols_plot = ceil(sqrt(Nplots));
wolffd@0 12 nrows_plot = ceil(Nplots/ncols_plot);
wolffd@0 13 Nplots = nrows_plot*ncols_plot;
wolffd@0 14 for p=1:Nplots
wolffd@0 15 subplot(nrows_plot, ncols_plot, p);
wolffd@0 16 end
wolffd@0 17 end