disp('---------------------------------------------------------------------')
disp('                                                                     ')
disp('      O  K  E  N  N  I      T  R  A  N  S  F  O  R  M  A  C  E       ')
disp('                                                                     ')
disp('NABIDKA OKEN:                                                        ')
disp('        1.RECTANGULAR        7.TUKEY         13.SINUS-CARDINALIS     ')
disp('        2.BLACKMANN-HARRIS   8.RADAR         14.PARSEN1              ')          
disp('        3.HAMMING            9.BARLETT       15.PARSEN2              ') 
disp('        4.HANNING           10.TRIANGULAR    --16.TRANSIENT          ')
disp('        5.PLOCHY VRCH       11.CHEBYSHEV     --17.EXPONENTIAL        ')
disp('        6.KAISER-BESSEL     12.GAUSS                                 ')
disp('                                                                     ')
disp('Pozn.:  Okna c.1-7 jsou specialni pripady zobecneneho KOSINOVEHO okna') 
disp('---------------------------------------------------------------------')

cg=input('Zadejte poradove cislo okna pro okenni transformaci       :      ');
N=20;

if (cg==1) g=gcw(N,1,1,0,0,0,0);                 nazev='Obdelnikove okno';end
if (cg==2) g=gcw(N,1,1,1.36109,0.39381,0.03256,0);nazev='Blackmann-Harrisovo okno';end
if (cg==3) g=gcw(N,1,1,0.84,0,0,0);              nazev='Hammingovo okno';end
if (cg==4) g=gcw(N,1,1,1,0,0,0);                 nazev='Hanningovo okno';end
if (cg==5) g=gcw(N,1,1,1.93,1.29,0.388,0.0322);  nazev='Plochy vrch';end
if (cg==6) g=gcw(N,1,1,1.29,0.244,0.00305,0);    nazev='Kaiser-Besselovo okno';end
if (cg==7) g=gcw(N,1,0.54,0.46,0,0,0);           nazev='Tukyovo okno';end
if (cg==8) g=radar(N-1);                         nazev='Radarove okno';end
if (cg==9) g=bartlett(N);                        nazev='Bartlettovo okno';end
if (cg==10) g=triang(N);                         nazev='Trojuhelnikove okno';end
if (cg==11) g=chebwin(N-1,30);                   nazev='Chebyshovo okno';end
if (cg==12) g=gauss(N-1,1);                      nazev='Gaussovske okno';end
if (cg==13) g=sincard(N);                        nazev='Sinus-cardinalis okno';end
if (cg==14) g=parsen1(N-1,2);                    nazev='Parsenovo1 okno';end
if (cg==15) g=parsen2(N-1,2);                    nazev='Parsenovo2 okno';end
%if (cg==16) g=transient(N);                      nazev='Transient okno';end
%if (cg==17) g=exponent(N);                       nazev='Exponencialni okno';end
%if (cg==18) g=radar(N);                          nazev='Radarove okno';end

% Normovani okna
g=g/norm(g,2);
figure
plot(g);

% Fourieruv obraz okna
G=fft(g);
fwin=abs(G(1:N/2));
fw=[];
for i=1:N/2
  fw=[fwin(i) fw fwin(i)];
end;
figure
plot(1:N,fw);




