I am trying to compare two scalar values, however, I reach “matrix dimensions must agree” error. The code is:
cvx_solver MOSEK variable A(n,n,p) binary; subject to for f=1:p sum(A(1,:,f))==sum(A(:,1,f))+1; end
Error using cvxprob/newcnstr (line 87) Matrix dimensions must agree. Error in >= (line 21) b = newcnstr( evalin( 'caller', 'cvx_problem', '' ), x, y, '>=' ); Error in SolverForNew3R (line 19) sum(A(1,:,f))>=sum(A(:,1,f))+1;
Does anyone have any idea?