Hello,
How can I return a function from a function from file. For example:
.m
function f = squareAndDiff(x)f = diff(x*x);end
test.m
fminbnd(@squareAndDiff,0,10)
Error occurs saying:
"user supplied objective function must return a scalar value"
What does this mean and how can I fix it?
Thanks
Best Answer