Mercurial > hg > cip2012
comparison 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 |
comparison
equal
deleted
inserted
replaced
57:ceec4e8b6585 | 58:69b54aa5a9bb |
---|---|
1 function h=plottrack(X) | |
2 times=(X(:,1)-X(1,1))/1000; | |
3 Kick=find(X(:,2)==1); | |
4 Snare=find(X(:,2)==2); | |
5 plot(flatten([times';times']),flatten(X(:,[8,7])')/log(2)-2,'Color',[1,1,1]*0.25); | |
6 hold on; | |
7 stem(times(Kick),X(Kick,6)/log(2),'ro'); | |
8 stem(times(Snare),X(Snare,6)/log(2),'bx'); | |
9 hold off; | |
10 ylim([0,ceil(max(X(:,8))/log(2))-3]); | |
11 xlim([0,X(end,1)-X(1,1)]/1000); | |
12 legend({'entropy','info (kick)','info (snare)'}); | |
13 xlabel('time/s'); | |
14 ylabel('bits'); | |
15 h=gca; | |
16 end |