My system has 4 inputs representing orthogonal components of two vectors. I want to restrict the inputs to a finite set of discrete vectors. I thought of using ismember, but I'm not sure how to make it access a set of vectors. Right now I have:
| Code: |
constraints = [constraints, ismember(u(3:4,k), [...
V2.*[cos((p1+p2)*thetar - 0); sin((p1+p2)*thetar - 0)],...
V2.*[cos((p1+p2)*thetar - pi/3); sin((p1+p2)*thetar - pi/3)],...
V2.*[cos((p1+p2)*thetar - 2*pi/3); sin((p1+p2)*thetar - 2*pi/3)],...
V2.*[cos((p1+p2)*thetar - 3*pi/3); sin((p1+p2)*thetar - 3*pi/3)],...
V2.*[cos((p1+p2)*thetar - 4*pi/3); sin((p1+p2)*thetar - 4*pi/3)],...
V2.*[cos((p1+p2)*thetar - 5*pi/3); sin((p1+p2)*thetar - 5*pi/3)],...
[0;0]])];
|
My error is :
| Code: |
??? Error using ==> sdpvar.le at 18
Error using ==> sdpvar.minus at 135
Matrix dimensions must agree.
Error in ==> sdpvar.ismember at 78
varargout{1} = [ varargout{1}, min(varargin{2}) <= varargin{1} <= max(varargin{2})];
Error in ==> yalmipMPDTC at 28
constraints = [constraints, ismember(u(3:4,k), [...
|
Thanks for the help!