Hello,
I recently updated my YALMIP installation from something quite old (probably a release of 2013 or 2012, since I didin't use YALMIP in 2014), and I have a piece of code which is no longer working.
Here comes a sample of the code:
nPose = 12;
nPts = 15;
D = rand(nPose,nPts) < 0.75;
Mask = kron(D,[1;1;1]);
t = sdpvar(nPose,nPts,'full');
tP = t(:)>=0.00001
size(tP)
for i = 1:nPose
for j = 1:nPts
if(Mask(3*i,j) == 0)
tP((i-1)*nPose+j) = t(i,j)==1;
end
end
end
I got the following output and error:
++++++++++++++++++++++++++++++++++++++++
| ID| Constraint|
++++++++++++++++++++++++++++++++++++++++
| #1| Element-wise inequality 180x1|
++++++++++++++++++++++++++++++++++++++++
ans =
1 1
Error using constraint (line 9)
Not enough input arguments.
I guess an hint on the problem might be that size(tP) is returning [1 1] and so when I access tP((i-1)*nPose+j) then something gets wrong.
If I try to display tP or its size after the error, I get this:
>> size(tP)
ans =
1 3
>> tP
Field reference for multiple structure elements that is followed by more reference blocks is an error.
Error in constraint/getlist (line 10)
if isequal(X.List{2},'==')
Error in lmi (line 141)
[Fi,strict,LMIIdentifiers,tags] = getlist(X);
Error in constraint/display (line 3)
display(lmi(X));
Thanks for any help !