MATLAB: Using in-line function with fminbnd

in line function use with new handler

hello
I have created a separate handler (minusF) to deal with function maximum (fminbnd -f). However this needs an in line function. I get errors when using this. Will someone please instruct me on in line creation?
Thanks.

Best Answer

minusF = @(x) -f(x)
No inline function needed, only an anonymous function.