Mercurial > hg > cip2012
diff matlab/plottrack.m @ 58:69b54aa5a9bb
Added plottrack.m and redid drum plots with whole track plot.
author | samer |
---|---|
date | Fri, 16 Mar 2012 20:52:56 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/plottrack.m Fri Mar 16 20:52:56 2012 +0000 @@ -0,0 +1,16 @@ +function h=plottrack(X) + times=(X(:,1)-X(1,1))/1000; + Kick=find(X(:,2)==1); + Snare=find(X(:,2)==2); + plot(flatten([times';times']),flatten(X(:,[8,7])')/log(2)-2,'Color',[1,1,1]*0.25); + hold on; + stem(times(Kick),X(Kick,6)/log(2),'ro'); + stem(times(Snare),X(Snare,6)/log(2),'bx'); + hold off; + ylim([0,ceil(max(X(:,8))/log(2))-3]); + xlim([0,X(end,1)-X(1,1)]/1000); + legend({'entropy','info (kick)','info (snare)'}); + xlabel('time/s'); + ylabel('bits'); + h=gca; +end