# While running my model, why is it always stuck at a func named cvx_id

The optimization model is like:
minimize ∑||Hpi - pi’|| (sum of projective error)
subject to H = ∑θiHi (Hi is one estimation of H, all the Hi are known)
∑θi=1
0<= θi<=1
And the corresponding code I write is:
cvx_begin
variable Homog(3,3);
variable distnc;
variable distsum(1,col);
variable a(counter,1);
minimize distnc;
subject to
suma(a) == 1;
for i = 1:counter
0<=a(i);
a(i)<=1;
end
Homog(:,1)=sumVec(a,H_array,1);
Homog(:,2)=sumVec(a,H_array,2);
Homog(:,3)=sumVec(a,H_array,3);
distnc == sumdist(Homo,im1Pts,im2Pts);
cvx_end
Function sumVec:
function [summary] = sumVec(a,H_array,c)
[row,col] = size(a);
summary = zeros(3,1);
for i =1:row
cur_H = H_array{i}
summary = summary + a(i,:)% .* cur_H(:,c);
end
end
Function sumdist:
function [summary] = sumdist(Homo,im1Pts,im2Pts)
You either need to declare `Homog` as an expression per http://cvxr.com/cvx/doc/basics.html#assignment-and-expression-holders or if declared as a variable, use equality constraints `==` rather than `=`. Perhaps there’s more wrong with your program than that, but at least fix that.