function varargout = coscosh(x) % % % % [y] = coscosh(x) returns the function value in y % [y,yp] = coscosh(x) returns the function value in y and % the derivative in yp % % Matthias Heinkenschloss % Department of Computational and Applied Mathematics % Rice University % March 29, 2001 % % return the function value varargout{1} = cos(x)*cosh(x)+1; if( nargout > 1 ) % return the derivative as the second argument varargout{2} = -sin(x)*cosh(x)+cos(x)*sinh(x); end