%**********************************************************
%**             vyber koeficientu pro ulozeni            **
%**                 Diskrétní transformace               **
%**        Leos Marsalek  Leos.Marsalek@tiscali.cz       **
%**        Jan Skapa Jeniczek.s@seznam.cz (c) 2003       **
%**********************************************************

function [X_U,X_U_im,X_N_im]=vyber(X,koef);
prah=(max(max(abs(X)))/100)*abs(100-koef)/100;
velikost=size(X);
X_U_im=zeros(velikost);
X_N_im=zeros(velikost);
q=1;
for k=1:velikost(1)
    
for l=1:velikost(2)
        
if abs(X(k,l))>prah
            X_U(q)=X(k,l);
            X_U_im(k,l)=X(k,l);
            q=q+1;
        else
            X_N_im(k,l)=X(k,l);
        
end
    end
end