Mercurial > hg > trimatlab
diff mt_resample.m @ 0:be936975f254
Initial check in.
author | samer |
---|---|
date | Wed, 01 Feb 2012 14:06:37 +0000 |
parents | |
children | 0e0f2805ef9c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mt_resample.m Wed Feb 01 14:06:37 2012 +0000 @@ -0,0 +1,28 @@ +% mt_resample - Sample or resample melody triangle transition matrices of given size +% +% mt_resample :: +% mt_system ~'initial system' +% natural ~'size of transition matrices to resample' +% -> action mt_system. +% +% A new set of transition matrices will be sampled and a 3D information space +% scatter plot generated in the figure determined by the initial call to +% mt_init. + +function Sys=mt_resample(Sys,K) + [TT, II] = Sys.sample_transmats(K); + figure(Sys.fig); % 'name','info space'); + Sys.transmats{K} = TT; + Sys.info{K} = II; + Sys.hScat{K} = scatc(II,II(:,3),16); + axis on; box on; grid off; + lc=[0.4,0.4,0.4]; + set(gca,'Color','none'); + set(gca,'XColor',lc); + set(gca,'YColor',lc); + set(gca,'ZColor',lc); + xlabel('entropy rate'); + ylabel('redundancy'); + zlabel('pred-info rate'); + rotate3d on; +end