[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: quadprog: equality constraint matrix has incorrect column dim
Re: error: quadprog: equality constraint matrix has incorrect column dimension
Fri, 18 Jan 2019 06:28:42 -0600 (CST)
Okey, so I have tried in a command line octave sth like this:
/>pkg load optim
> C = [1, 1, 1, 1, 1;
1, 1, 1, 1, 0;
1, 1, 0, 0, 1;
1, 0, 1, 0, 0];
>d = [1; .7; .7; .01];
>lb = zeros (5, 1);
>ub = ones (5, 1);
>x = lsqlin (C, d, , , , , lb, ub)/
Return the same quadprog error.
But example from https://octave.sourceforge.io/optim/function/lsqlin.html
So, I have tried few combinations and I found that only x = lsqlin (C, d, A,
b, , , lb, ub) works. Aeq, beq - Linear equality constraint
matrix/vector could be empty, but empty A, b - Linear inequality constraint
matrix/vector returns quadprog error.
So, what should I put to these matrices (A,b) if I don't have any values.
Should it be empty, but with known dimension matrix or zeros matrix or ones
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html