function VARPHI = varphi(M_, Phi)

    NumberOfParameters = M_.param_nbr;
        for ii = 1:NumberOfParameters
                paramname = M_.param_names{ii};
                eval([ paramname ' = M_.params(' int2str(ii) ');']);
        end
      
ZETA_b = eta_b(M_, Phi) ;
ZETA_g = ( kappa*sig_g*((1-betta) + betta*sig_g/2) + eta*alpa + (1-eta)*Tu) / alpa;


VARPHI = ( varrho.*ZETA_g.^(1-varpi) + (1-varrho).*ZETA_b.^(1-varpi) ).^(1/(1-varpi)) ;


end