bugGNU Octave - Bugs: bug #30710, Support fminbnd

 
 

bug #30710: Support fminbnd

Submitted by:  Steve Chapel <schapel>
Submitted on:  Mon 09 Aug 2010 01:53:33 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.2.4Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 10 Aug 2010 06:39:10 PM UTC, comment #3:

The comment boxes for the bug tracker use a simple markup language where [asterisk text asterisk] becomes bold.

This can be a problem for code samples, such as the posted fminbind example, which use two asterisks for multiplication.

The use of plus_sign verbatim plus_sign and minus_sign verbatim minus_sign around blocks can help.

So, with that in mind.

The help for fminbnd says that it accepts a function handle or name. This suggests using @(x) or 'inline' to create a function handle. Both of the following work.

Rik <rik5>
Project Administrator
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

Alois Schlögl <schloegl>
Mon 09 Aug 2010 04:06:27 AM UTC, comment #1:

fminbind is already a built-in function on the development branch. You can get it by building from source or waiting for release 3.4 (somewhere in the next 6 months).

Rik <rik5>
Project Administrator
Mon 09 Aug 2010 01:53:33 AM UTC, original submission:

Octave currently does not support MATLAB's fminbnd function, as in:

[x y] = fminbnd('3^x-12x^2+40x-36', 3, 8);

Steve Chapel <schapel>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by schloegl (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by schapel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Aug 2010 04:06:27 AM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1