I wrote a 2D fused lasso code here.
[m n] = size(circle);
cvx_begin
variable theta(m, n);
minimize( norm(circle-theta, 'fro'));
subject to
sum(sum(abs(theta(:,1:n-1)-theta(:,2:n)))) == 0;
sum(sum(abs(theta(1:m-1,:)-theta(2:m,:)))) == 0;
cvx_end
Weirdly, the program report,
In cvxprob (line 28) In cvx_begin (line 41) Error using cvxprob/newcnstr (line 192) Disciplined convex programming error:
Invalid constraint: {convex} == {constant}Error in == (line 12) b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '==' );
After I remove abs()
in the constraint, the program could run, but that's not what constraints I expect to be.