function VectorFaS = CstGetFrequencyResults
global mws result1D_s11
%--------------------------------------------------------------------------
% Funkce: K ziskani vypocetanych frekvenci a s11
% Vytvoreni funkce: 08.12.2008
% Autor: Petr Moravec
% Vector zobrazujici S11,S11dB a frekvenci -> VectorFaS
%--------------------------------------------------------------------------
    result1D_s11  = mws.invoke('Result1D','a1(1)1(1)');
    units  = mws.invoke('Units');
    jed = units.invoke('GetFrequencyUnitToSI');
    i = 1;
    
    nf(i) = result1D_s11.invoke('GetFirstMinimum',0.5);
    while (nf ~= -1)
        i = i+1;
        nf(i) = result1D_s11.invoke('GetNextMinimum',0.5);
    end
    
    [m,n]=size(nf);
    VectorFaS = ones((n-1),3);
    jed=jed*1;
    for j=1:(n-1)
        VectorFaS(j,1) = result1D_s11.invoke('GetY',nf(j));
        VectorFaS(j,2) = 20*log10(VectorFaS(j,1));
        VectorFaS(j,3) = (result1D_s11.invoke('GetX',nf(j))).*jed;
    end
    
    disp('     [-]      [dB]       [f]');
    disp(VectorFaS);
    
end