0001 function f = Tenefit_jd(rho,f0,fa,e1,e2) 0002 % 0003 if all(imag(fa) == 0),%fa is edge value 0004 f = (f0 - fa).*(1 - rho.^e1).^e2 + fa; 0005 elseif all(real(fa) == 0),%fa is edge/core value 0006 f = f0.*((1 - imag(fa)).*(1 - rho.^e1).^e2 + imag(fa)); 0007 else 0008 error('edge value not valid.') 0009 end