a1=1;
a2=0.9;
a3=0.01;
N=100;
fs=1;
f1=5.5/N;
f2=6.5/N;
f3=10.5/N;
freq=((0:(N-1))*fs)/(N);
t = (0:N-1) / fs;
x = a1*cos(2*pi*f1*t)+a2*cos(2*pi*f2*t)+a3*cos(2*pi*f3*t);
dx1=cos(2*pi*f1*t)+0.9*cos(2*pi*f2*t)+0.01*cos(2*pi*f3*t);
dx2=cos(2*pi*f1*t)+0.9*cos(2*pi*f2*t)+0.01*cos(2*pi*f3*t);
%X = fft(x.*bartlett(length(N)));
DX11=abs(fft((dx1.*rectwin(N)')));
figure(1)
plot(freq,20*log(abs(DX11)));
title('WYKRES rectwin - 1d')
DX12=abs(fft((dx1.*bartlett(N)')));
figure(2)
plot(freq,20*log(abs(DX12)));
title('WYKRES bartlett - 1d')
DX13=abs(fft((dx1.*hamming(N)')));
figure(3)
plot(freq,20*log(abs(DX13)));
title('WYKRES hamming - 1d')
DX14=abs(fft((dx1.*hanning(N)')));
figure(4)
plot(freq,20*log(abs(DX14)));
title('WYKRES RECTWIN - 1d')
DX15=abs(fft((dx1.*blackman(N)')));
figure(5)
plot(freq,20*log(abs(DX15)));
title('WYKRES blackman - 1d')
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}