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
works well.
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
matrix?
-----
ola
--
You probably found a bug in lsqlin. The problem is (but should not be) that you provide all empty constraints: A = b = Aeq = beq = [].
In short: `horzcat ({1},[],{2})` will evaluate to `{1, 2}` not `{1, [], 2}`.
A fix is to surround the arguments "{A}" and "{b}" in the aforementioned line.
Best,
Kai