MATLAB: Doubt regarding the fzero command.

fzero

Hi guys,
What does it mean when we write in a code P0 = fzero (@somefunction, [1, 25]). Does it mean search for an answer in the interval from 1 to 25 ? I usually set one value in which fzero start its search for the solution.
That`s the actual line that`s puzzling me
P0=fzero(@(P0) estimateSurfacePressure(P0,false,extPar), [1 25]);
The last thing is estimateSurfacePressure is a .m file the way fzero goes in this file is pretty weird for me. What does @(P0) mean? It looks somewhat like those function we create like this y = @(x) [x^2] is there something to do with it?
Thank you very much for helping.

Best Answer

It means that the function estimateSurfacePressure() is in the path and will be evaluated for different values of PO until one yielding zero value has been found.
It also means that estimateSurfacePressure() returns a scalar.