help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: optimizing error: undefined argument


From: Allen.Windhorn
Subject: RE: optimizing error: undefined argument
Date: Tue, 16 Aug 2011 08:37:46 -0500

Doug Stewart-4 wrote:
 
>> To use your function you must pass a number to it like:
>> 
>> func(6) ...

-----Original Message-----
From: address@hidden On Behalf Of DGati

> Yes, but if I try minimizing a function or maximizing it, I
> shouldn't pass it a number since I don't know at which value
> the function will be minimal.  This is exactly the point.
>
> minimize(func, x) is the syntax to 'minimize', where x is the
> list of arguments to func (in this case, only one). Surely I
> wouldn't need to pass a number for x?

I looked at the documentation for minimize and it wasn't at all
clear to me what is expected, but maybe it is looking for an
initial guess in which case you would have to give it numbers.
It also looked as if it wanted a string for the function (e.g.
minimize("func", x), or maybe a function pointer.  I haven't
looked at the code though.

Have you considered sqp or one of the other optimization
routines as an alternative?

Regards,
Allen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]