I meaned the similar logic applies to the second one. If x is binary(then the constraints like" tā~=t " can be removed), then maybe the following works for the first constraint:
Many of those can be vetorized by a home-made string processing program automatically ļ¼sorry, Iām not sure since it seems the ārepmat()ā is not overloaded by the CVX developer, but CVX didnāt error it. If repmat() can duplicate variables as a convex function itself, that would be good?). I donāt know the second one.
Use the similar logic of the first one. you need to use diag() and maybe a - to minus itself so as to obey the rule t~=tā. sorry i donāt have my computer around to write it down. i guess it will work(because it is still linear with a minus). happy christmas.
(by the way, i guess if cvx could detect an expression minus itself and set it as 0, that would be more convenient for vectorizing many more kinds of constraints, because convex expression minus itself is not recognized as convex in cvx.)
Note:by moderator: Changed ācanā to could, just to make clear to other readers that CVX will not detect an expression minus itself and treat it as 0