Mercurial > hg > cip2012
annotate matlab/plottrack.m @ 75:8a146c651475 tip
Added ready made bbl
author | samer |
---|---|
date | Fri, 01 Jun 2012 16:19:55 +0100 |
parents | 69b54aa5a9bb |
children |
rev | line source |
---|---|
samer@58 | 1 function h=plottrack(X) |
samer@58 | 2 times=(X(:,1)-X(1,1))/1000; |
samer@58 | 3 Kick=find(X(:,2)==1); |
samer@58 | 4 Snare=find(X(:,2)==2); |
samer@58 | 5 plot(flatten([times';times']),flatten(X(:,[8,7])')/log(2)-2,'Color',[1,1,1]*0.25); |
samer@58 | 6 hold on; |
samer@58 | 7 stem(times(Kick),X(Kick,6)/log(2),'ro'); |
samer@58 | 8 stem(times(Snare),X(Snare,6)/log(2),'bx'); |
samer@58 | 9 hold off; |
samer@58 | 10 ylim([0,ceil(max(X(:,8))/log(2))-3]); |
samer@58 | 11 xlim([0,X(end,1)-X(1,1)]/1000); |
samer@58 | 12 legend({'entropy','info (kick)','info (snare)'}); |
samer@58 | 13 xlabel('time/s'); |
samer@58 | 14 ylabel('bits'); |
samer@58 | 15 h=gca; |
samer@58 | 16 end |