%% Solve Problem Structure
% Solve a problem that is defined by a problem structure.
% Define a structure that encodes a root-finding problem.

problem.objective = @(x)sin(cosh(x));
problem.x0 = 1;
problem.solver = 'fzero'; % a required part of the structure
problem.options = optimset(@fzero); % default options

%
% Solve the problem.

x = fzero(problem)

% Copyright 2015 The MathWorks, Inc.