Find a zero of a cubic polynomial x^3+b*x+c for different values of b
and c near x0.
Try:
function y =
findzero(b, c, x0) options = optimset('Display',
'off'); % Turn off Display y = fzero(@poly, x0, options); function y =
poly(x) % Compute the polynomial.
y = x^3 + b*x
+ c; end end
x = findzero(2, 3.5, 0)
Nested_func_example.src last modified Oct 17, 2007