01 function y = function(x,P1,P2,P3,P4) 02 % MEMFUN private function for MEM 03 y = ((simpson(P1,P2.*repmat(exp(P3*transpose(x)),1,P4)))); 04 05 % comment out this if fmins,fminu, fminsearch fminunc is used 06 %return 07 08 ind = isnan(y); 09 if any(ind) 10 y(ind) = x(ind)*100; 11 end 12 %(y) 13 %y = log(1+y); 14 15 % 16 y = sum((abs(y))); 17 18 %
Comments or corrections to the WAFO group