%Script to plot accuracy for all windows with low pass filtered noise as
%input

% Developer:  - Alice Clifford (alice.clifford@eecs.qmul.ac.uk)


clear all
close all

winShapes={
    'blackman',
    'blackmanharris',
    'flattopwin',
    'gausswin',
    'hamming',
    'hann',
    'rectwin',
    };

winShapesLabels={
    'Blackman';
    'Blackman-Harris';
    'Flat Top';
    'Gaussian';
    'Hamming';
    'Hann';
    'Rectangular';}


for w=1:length(winShapes)
    load(strcat('noiseExpandBand_',winShapes{w}));
    percHitsMat=percHitsMat';
    
    allWinPercHitsMat(:,w)=percHitsMat(:,1);
    
    
end



figure

figWidth=7;
figHeight=3;
set(gcf, 'units', 'inches', 'pos', [0 1000 figWidth figHeight])

colorVec=(linspace(0,0.5,2))';

colorMat=[colorVec colorVec colorVec];

set(gcf,'DefaultAxesColorOrder',colorMat)
set(gcf,'DefaultAxesLineStyleOrder','-|--|:|-.')

set(gca,'FontSize',8)

semilogx(bandWidth,allWinPercHitsMat,'LineWidth',2)
xlim([min(bandWidth) 22050])

xlabel('Bandwidth (Hz)')
ylabel('Accuracy (%)')
legend(winShapesLabels,'Location','SouthEast')