samer@0: % mt_show_transmat - Display image of transition matrix for voice samer@0: % samer@0: % mt_show_transmat :: samer@0: % natural ~'voice id' samer@0: % [[K,K]] ~'transition matrix' samer@0: % -> action void. samer@11: % samer@11: % Also displays global information measures in bits in the title. samer@0: samer@3: function mt_show_transmat(Id,T,I) samer@0: figure(Id); samer@0: imagesc(T,[0,1]); samer@0: axis xy; samer@16: if nargin<3, I=mc_global_info1(T,0.0001); end samer@11: I=I/log(2); % convert to bits samer@11: htit=title(sprintf('H=%.2f, R=%.2f, PI=%.2f',I(1),I(2),I(3))); samer@11: addkbcallback(gcf); samer@11: addkbcallback(gcf,@(k)show_eigs(Id,T)); samer@11: set(htit,'ButtonDownFcn',@(a,b)show_eigs(Id,T)); samer@3: end samer@11: samer@11: function show_eigs(Id,T) samer@11: figure(40); samer@17: colormap prism; samer@11: [V,D]=eig(T); d=diag(D); samer@11: k=find(abs(d-1)<0.001); samer@11: subplot(3,1,1); plot_cvec(diag(D)); samer@11: title(sprintf('%d: eigenvalues %s',Id,mat2str(d(k)))); samer@11: subplot(3,1,2); plot_cvec(sum(V)); title('sum eigenvectors');%ylim([-1,1]); samer@11: subplot(3,1,3); plotseq(@plot_cvec,window(V)); title('eigenvector'); samer@11: end