Tue 10 Aug 2010 09:10:38 AM UTC, comment #2:
I've compiled it from the latest sources (v3.3.52+, can not find v3.4) and see that the command fails
octave:1> version
ans = 3.3.52+
octave:2> [x y] = fminbnd('3^x-12x^2+40x-36', 3, 8)
error: @3^x-12x^2+40x-36: no function and no method found
error: called from:
error: /home/schloegl/src/octave/scripts/optimization/fminbnd.m at line 68, column 9
The command in Matlab causes an error
[x y] = fminbnd('3^x-12x^2+40x-36', 3, 8)
??? Error using ==> inlineeval
Error in inline expression ==> 3^x-12x^2+40x-36
??? Error: Unexpected MATLAB expression.
Error in ==> inline.subsref at 25
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
Error in ==> fminbnd at 212
x= xf; fx = funfcn(x,varargin{:});
The command runs if modifed in this way.
>> [x y] = fminbnd('3^x-12x^2+40x-36', 3, 8)
x =
3.1908
y =
2.7540
|