[Top][All Lists]

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

Re: sqp() with trapz()

From: Nicholas Jankowski
Subject: Re: sqp() with trapz()
Date: Mon, 26 Aug 2019 14:54:52 -0400

On Mon, Aug 26, 2019 at 2:39 PM Przemek Klosowski via Help list for GNU Octave <address@hidden> wrote:
On 8/26/19 2:32 PM, dg.aragones wrote:

I copied and pasted your original code.  looking at the sqp line, I see in the help that sqp of the form:
sqp (X0, PHI, G)
X0 to be a vector
PHI to be the objective function that accepts a vector and returns a scalar and
G to be a constraint function that must accept a vector argument and return a vector.

If your case,  both F and R accept a vector and returns a scalar.  could that be part of the problem?  it gives the error: 

>> sqp(y,F,R)
error: operator *: nonconformant arguments (op1 is 51x51, op2 is 1x51)

(both s and y are 1x51 when I run your code unmodified.)

is sqp performing some array functions internally that is expecting a vector output from R to build a 51x51 array, but since it's only outputting scalars op2 is the wrong size?

reply via email to

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