load s01_pitch
M = 512;


% Ovo je "pitch", odnosno osnovna frekvencija glasnica.
% Osim osnovne frekvencije, u glasu je sadzan i citav niz harmonika.
jjv_regular=jjv;
jjv_regular(find(jjv==0))=NaN;

figure;
plot([0:length(fco5)-1],[fs./jjv_regular' fco5' fco5b'].*(vo2i'*[1 1 1]));
legend('raw','3.rd ord ph','3.rd ord best');
ax=axis;
axis([0 length(fco5)-1 0 min(max_f0,ax(4))]);


bf=length(cEn_m);
Nt=M/2;
hma=zeros(Nt,bf);
for i=1:bf,
   hma(:,i)=freqz(sqrt(cEn_m(i)),ca_m(i,:),Nt);
end;

% figure;
% pcolor([1:bf],[0:Nt-1]/Nt*fs/2,20*log10(abs(hma)));shading interp
% 
% figure;
% pcolor([2:bf-1],[0:Nt-1]/Nt*fs/2,20*log10(abs(val_estm)));shading interp
% caxis([-70 -20])
% 

% Ovo je pseudo-spektrogram signala koji sadrzi osnovni i ostale harmonike
hmaw=hma(:,2:end-1).*val_estm;

figure;
pcolor([2:bf-1],[0:Nt-1]/Nt*fs/2,abs(hmaw)); shading interp

