function [Npl_ar]=Np_line_dens(h_h,fr_h,h_int,prm_ar,lin_dsc)
sz_prm=size(prm_ar);
L_prm=sz_prm(1);
w_prm=sz_prm(2);
L_lin_dsc=length(lin_dsc);
arl_dsc(1:L_lin_dsc-1)=lin_dsc(2:L_lin_dsc);
for ii_prm=1:w_prm
    prm_c=prm_ar(:,ii_prm);
    alf_c=prm_c(1);
    k_c=prm_c(2);
    fr_0_c=prm_c(3);
    fr_w_c=prm_c(4);
    x=h_h_c-h_int(1);
f_aprr_c=fr_0_c+fr_w_c*(k_c*x.^alf_c./(1+k_c*x.^alf_c));
k_lin_0=0;
hf_lin=zeros(L_h,3)-1e11;
for i_h=1:L_h
    df=fr_h(i_h,:)-f_appr_c;
    adf=abs(df);
    f_up=find(df>lin_dsc(1) & df<arl_dsc(2));
    L_up=length(f_up);
    f_dn=find(df<-lin_dsc(1) & df>arl_dsc(1));
    L_dn=length(f_dn);
    if L_dn>0
        rat_up_dn=L_up/L_dn;
    else
        rat_up_dn=1e6;
    end
    if rat_up_dn<arl_dsc(3)
f_lin_0=find(adf<=lin_dsc(1));
L_lin_0=length(f_lin_0);
if L_lin_0>0
    h_h_c=h_h(i_h);
    fr_h_c=fr_h(i_h,f_lin_prev_0)';
    %pw_h_c=pw_h(i_h,f_lin_prev_0)';
    if L_lin_prev_0>1
        fr_cc=mean(fr_h_c);
     %   pw_cc=mean(pw_h_c);
    else
            fr_cc=fr_h_c;
      %      pw_cc=pw_h_c;
    end
    hf_lin(i_h,:)=[h_h_c,fr_cc];
end
    end
end
f_ok_lin=find(hf_lin,2)>0;
L_ok_lin=length(f_ok_lin);
Npl_ar_u(ii_prm,:)=[ii_prm,L_ok_lin,rat_up_dn];
end
Npl_ar=sortrows(Npl_ar_u,2);

