%% Root of Function with Extra Parameter
% Find the root of a function that has an extra parameter.

myfun = @(x,c) cos(c*x);  % parameterized function
c = 2;                    % parameter
fun = @(x) myfun(x,c);    % function of x alone
x = fzero(fun,0.1)

% Copyright 2015 The MathWorks, Inc.