help-octave
[Top][All Lists]
Advanced

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

Re: Problem minimizing with sqp


From: Doug Stewart
Subject: Re: Problem minimizing with sqp
Date: Fri, 12 Jul 2019 17:25:55 -0400



On Fri, Jul 12, 2019 at 3:52 PM Brett Green <address@hidden> wrote:
I need to minimize a function of two variables. It looks like sqp is the sort of function I should use for that.

As a test to make sure I was using the function properly, I put in the following paraboloid:

f = @(v) 2*v(1).^3 + 3*v(2).^4;
[x, obj, info, iter, nf, lambda] = sqp([1,3],f)

was given the result

x =
  -1.1753e+11
   1.7162e+08

Clearly this is completely wrong - the minimum of the function f is at (0,0)! Have I done something wrong here or is it a bug?

- Brett Green

if you try

f = @(v) abs(2*(v(1)-1).^3) + 3*v(2).^4;
[x, obj, info, iter, nf, lambda] = sqp([1,3],f)

it finds a minimum!!! at +1

--
DASCertificate for 206392


reply via email to

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