d@0
|
1 function songDataSet = plotPitchData()
|
d@0
|
2
|
d@0
|
3 pitchDataInput = 1:13;
|
d@0
|
4 pitchDataInput(11) = [];
|
d@0
|
5 pitchDataInput(7) = [];
|
d@0
|
6 pitchDataInput(6) = [];
|
d@0
|
7 pitchDataInput(5) = [];
|
d@0
|
8 pitchDataInput(3) = [];
|
d@0
|
9 pitchDataInput(1) = [];
|
d@0
|
10
|
d@0
|
11 % data = readInCSV('Dataset.csv')
|
d@0
|
12
|
d@0
|
13 songDataSet = {'How long has this been going on?', 'Wh';
|
d@0
|
14 'But don`t you remember?', 'YN';
|
d@0
|
15 'Is there life on Mars?', 'YN';
|
d@0
|
16 'Can you feel the love tonight?' 'YN';
|
d@0
|
17 'What have I done?', 'Wh';
|
d@0
|
18 'Are we human or are we dancers?', 'Echo';
|
d@0
|
19 'How can anybody possibly know how I feel?', 'Wh';
|
d@0
|
20 'D`you know what I mean?', 'YN';
|
d@0
|
21 'Do you remember?', 'YN';
|
d@0
|
22 'Do you remember the first time?', 'YN';
|
d@0
|
23 'Who want to live forever?', 'Wh';
|
d@0
|
24 'Is this the real life?', 'YN';
|
d@0
|
25 'Is this just fantasy?', 'YN'};
|
d@0
|
26
|
d@0
|
27
|
d@0
|
28
|
d@0
|
29
|
d@0
|
30 plotCol = ['y','m','c','r','g','b','k','m','c','r','g','b','k'];
|
d@0
|
31 colIndex = 1;
|
d@0
|
32 for i = pitchDataInput
|
d@0
|
33 % i
|
d@0
|
34 songTrack = csvread(strcat(num2str(i),'.csv'));
|
d@0
|
35 songTrack = songTrack(:,1:2);
|
d@0
|
36 % songTrack = songTrack(ceil(end/2):end,:)
|
d@0
|
37
|
d@0
|
38 songTrack(:,1) = songTrack(:,1) / max(songTrack(:,1));
|
d@0
|
39 songTrack(:,2) = smooth(songTrack(:,2),50);
|
d@0
|
40 songTrack = songTrack(songTrack(:,1)<0.95,:);
|
d@0
|
41 % songTrack(:,2) = songTrack(:,2) / min(songTrack(:,2));
|
d@0
|
42 size(songTrack);
|
d@0
|
43
|
d@0
|
44 songTrack(:,2) = songTrack(:,2) / max(songTrack(:,2));
|
d@0
|
45
|
d@0
|
46 songTrack(songTrack(:,2) == 0,:) = [];
|
d@0
|
47 hold on
|
d@0
|
48 plot(songTrack(:,1),songTrack(:,2),plotCol(colIndex));
|
d@0
|
49
|
d@0
|
50 % plot(songTrack(:,1),smooth(songTrack(:,2),size(songTrack,1)/20),plotCol(colIndex));
|
d@0
|
51 colIndex = colIndex +1;
|
d@0
|
52 end
|
d@0
|
53 xlabel('Normalised Time');
|
d@0
|
54 ylabel('Normalised Frequency');
|
d@0
|
55 title(strcat('Full Data Plot of Question Type: ',songDataSet{2,2}));
|
d@0
|
56 legend(songDataSet{pitchDataInput,1});
|
d@0
|
57 saveas(gcf,'plots/FullDataPlot','pdf');
|
d@0
|
58
|
d@0
|
59
|
d@0
|
60 end |