close all; clear all; load mir-st500.mat songCount=length(ds); for i=1:songCount % fprintf('%d/%d:\n', i, songCount); pitch=ds(i).noteGt.pitch; opt=bestKeyTranspose('defaultOpt'); [shiftedPv, ds(i).shiftAmount, ds(i).ratio]=bestKeyTranspose(pitch, opt); end figure; subplot(211); bar([ds.ratio]); xlabel('Song index'); ylabel('White key ratio'); subplot(212); bar([ds.shiftAmount]); xlabel('Song index'); ylabel('Best shift amount'); figure; [sortedRatio, id]=sort([ds.ratio]); subplot(211); bar(sortedRatio); xlabel('Permutated song index'); ylabel('Sorted white key ratio'); subplot(212); bar(sort([ds.shiftAmount])); xlabel('Permutated song index'); ylabel('Sorted best shift amount'); %shiftAmount=[ds.shiftAmount]; %shiftAmount2=shiftAmount(id); %subplot(212); bar(shiftAmount2); xlabel('Permutated song index'); ylabel('Sorted best shift amount');