view overlap_log_p_1.m @ 4:72c011ed1977 tip

more elaborate example with non-stat. estimate explanation
author smusevic
date Tue, 30 Jul 2013 09:56:27 +0100
parents a4a7e3405062
children
line wrap: on
line source
fs = 441;;
N = 2^10-1;

ply = [1000, -65, -1.2];

t = [-(N-1)/2:(N-1)/2];

p_val = polyval(ply,t);
f = log(p_val);
f_fit = polyfit(t,f,20);
real(f_fit(end - 3:end))

ply(end-1)/ply(end)
log(ply(end))

figure(1);clf;
subplot(311);
plot(p_val);
subplot(312);hold on
plot(real(f)); 
plot(real(polyval(f_fit,t)),'r--');
subplot(313);
plot(imag(f)/pi*-2+1);