fminunc with a one-variable function
John W. Eaton
jwe at octave.org
Fri Jul 24 12:00:17 CDT 2009
On 24-Jul-2009, Jonathan Stickel wrote:
| Jaroslav Hajek wrote:
| > On Thu, Jul 23, 2009 at 5:32 PM, Jonathan Stickel<jjstickel at vcn.com> wrote:
| >> I see the following when I use fminunc to minimize a function of just one
| >> variable:
| >>
| >> function F = theF(x)
| >> F = x.^2 + exp(x);
| >> endfunction
| >> x0 = 1;
| >> [xmin,fmin] = fminunc(@theF,x0)
| >>
| >> error: Invalid call to cholupdate. Correct usage is:
| >>
| >> -- Loadable Function: [R1, INFO] = cholupdate (R, U, OP)
| >>
| >>
| >> I know that there are other minimization functions that can be used for
| >> single-variable functions, but fminunc should work too.
| >>
| >> Thanks,
| >> Jonathan
| >>
| >
| > Please try
| > http://hg.savannah.gnu.org/hgweb/octave/rev/5fcf008c7c41
| >
|
| What is the best way for me to try this update? Simply running
| mkoctfile on the new chol.cc generates very many errors. Here are the
| last few:
|
| /opt/local/include/octave-3.2.0/octave/utils.h:113: error: two or more
| data types in declaration of $,1rx(Boctave_sleep$,1ry(B
| /opt/local/include/octave-3.2.0/octave/utils.h:115: error: two or more
| data types in declaration of $,1rx(Boctave_usleep$,1ry(B
| /opt/local/include/octave-3.2.0/octave/utils.h:118: error: two or more
| data types in declaration of $,1rx(Boctave_raw_vsnprintf$,1ry(B
| chol.cc:48: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:48: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:48: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:341: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:341: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:341: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:491: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:491: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:491: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:583: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:583: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:583: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:800: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:800: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:800: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:984: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:984: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:984: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:1116: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:1116: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| chol.cc:1116: error: $,1rx(BOCTAVE_EXPORT$,1ry(B does not name a type
| /opt/local/include/octave-3.2.0/octave/defun-int.h:47: error: storage
| size of $,1rx(Binstall_dld_function$,1ry(B isn$,1ry(Bt known
| /opt/local/include/octave-3.2.0/octave/defun-int.h:42: error: storage
| size of $,1rx(Binstall_builtin_function$,1ry(B isn$,1ry(Bt known
|
| I can run mkoctfile fine on some older octave c++ files I have lying around.
The .oct files that are part of Octave can't be built outside of the
Octave build process unless you do some modification. The #include
directives assume that you are building inside the Octave source tree.
jwe
More information about the Bug-octave
mailing list