help-octave
[Top][All Lists]
Advanced

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

Re: SQP - Reducing Vector Size?


From: jjmilburn
Subject: Re: SQP - Reducing Vector Size?
Date: Tue, 23 Apr 2013 19:47:26 -0700 (PDT)

After posting, I noticed that the problem may be that the initial x0 was
defined as a scalar, and this was affecting the result.  I changed the
initial x0 to be the same size as "w", and now the error that occurs is:

octave:69> sqp(qw, @(w)cost(w),[],@(w)conEq(w))
error: operator *: nonconformant arguments (op1 is 50x51, op2 is 1x51)
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/3.2.4/m/optimization/qp.m at line 238, column 19
error:   /usr/share/octave/3.2.4/m/optimization/sqp.m at line 414, column 34
error:   /home/josh/octaveExperiment/data/trainSVM.m at line 44, column 7

I am passing sqp a 1x51 decision variable vector.  On a hunch, I changed my
funcition call to the following (qw transposed, or qw' as the initial
condition):

octave:69> sqp(qw', @(w)cost(w),[],@(w)conEq(w))

This worked, and it appears to run.  I will continue to examine this, but
can someone confirm if sqp will only accept column vectors, not row vectors?

Thanks,




--
View this message in context: 
http://octave.1599824.n4.nabble.com/SQP-Reducing-Vector-Size-tp4652246p4652247.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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