function patchant(f,h,eps,Ri)
 
f = f*1e9;                                 % frequency [Hz]
c = 3e8;                                   % light velocity [m/s]
k = (2*pi*f)/c;                            % propagation constant in free space [rad/m]
 
mi = 1;                                    % relative permeability of dielectric substrate [-]
h  = h*1e-3;                               % substrate thickness [m]
 
w  = (c/(2*f*sqrt(eps)))*1e3;              % patch width [mm]
 
ind = 1;
for n = 1:5
 
    eps_eff = (eps+1)/2 + ((eps-1)/2)*((1+(10*(h*1e3))/w)^-0.5);  % effective permittivity [-]
 
    delta = (0.412*(((eps_eff+0.300)*(w/(h*1e3) + 0.262))/((eps_eff-0.258)*(w/(h*1e3)+
             0.813)))*1e3)*h;
 
    l = (c/(2*f*sqrt(eps_eff)))*1e3 - 2*delta;                    % patch length [mm]
 
    G = (w/(120*((c/f)*1e3)))*(1-((k*(h))^2)/24);
 
    R = 1/(2*G);                                                  % input impedance [Ohm]
 
    x = (l/pi)*asin(sqrt(Ri/R));            % distance of coaxial probe from patch center [mm]
    
    sol_l(ind,1) = l;
    sol_x(ind,1) = x;
    
    ind = ind + 1;
    
    w = l;
end
 
disp(sprintf('Rozmery flicku - delka i sirka [mm]     Sonda od stredu flicku [mm]'));
disp(sprintf('%0.4g                                   %0.3g', sol_l(5,1), sol_x(5,1)));