%%%%%%% % permplotter.m % Author: Lance Harden, Davidson College % June 2006 % % Description: Used in conjunction with signedperms, permplotter plots % multiple curves displaying the survival rate of bacteria versus the % number of flips that have occurred on the same page. Each curve is % displayed on its own set of axes, making permplotter ideal for comparing % the graphs of several starting permutations. Its inputs are k, the number % of pancakes in the stack, and curve, a bigbox-formatted matrix of data % compiled using one of the other pancake simulator programs such as % bigtrial. function permplotter(k,curve) A = signedperms(k); dist = []; for iperm = 1:length(A) dist(iperm) = find(curve(:,iperm),1); end [sdist,ind] = sort(dist); %%ids = [11:16 18 20 24:28 30 32 34:42 44:56 58:61]; for iplot = 1:20 %%length(ids) subplot(4,5,iplot,'align');plot(test(:,ind(iplot))) title(mat2str(A(ind(iplot),:))) set(gca,'XTick',1:2:20) ylim([0 .12]) end