fminunc with a one-variable function

Jonathan Stickel jjstickel at vcn.com
Fri Jul 24 09:38:39 CDT 2009


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 ‘octave_sleep’
/opt/local/include/octave-3.2.0/octave/utils.h:115: error: two or more 
data types in declaration of ‘octave_usleep’
/opt/local/include/octave-3.2.0/octave/utils.h:118: error: two or more 
data types in declaration of ‘octave_raw_vsnprintf’
chol.cc:48: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:48: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:48: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:341: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:341: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:341: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:491: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:491: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:491: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:583: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:583: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:583: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:800: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:800: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:800: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:984: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:984: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:984: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:1116: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:1116: error: ‘OCTAVE_EXPORT’ does not name a type
chol.cc:1116: error: ‘OCTAVE_EXPORT’ does not name a type
/opt/local/include/octave-3.2.0/octave/defun-int.h:47: error: storage 
size of ‘install_dld_function’ isn’t known
/opt/local/include/octave-3.2.0/octave/defun-int.h:42: error: storage 
size of ‘install_builtin_function’ isn’t known

I can run mkoctfile fine on some older octave c++ files I have lying around.

Jonathan


More information about the Bug-octave mailing list