
params.Fs=sampfreq;

[S,f]=mtspectrumc(coeffs(:,1:recon_keep),params);

    figure;

    index=1:recon_keep;
   

    pcolor(index, f, 10*log10(S)); shading flat; colormap hot;
    
    xlabel('Principal Component Index');
    ylabel('Frequency (Hz)');
    title('spectrum');
    
    
    clear S f index