There are a few inconsistencies in your codes, i.e.,
f is a fcn not defined as a fcn handle or fcn file. What is fgraf() fcn?
The variable "ans" is not defined.
Just presuming that the problem exrcise and interval, the following can be used
F=@(x) 0.1*x - sin(2*x) + 0.25;
disp(strcat("Zero found in the interval: ", num2str([a, b])));