I want to ask to solve the socp problem


(Orange3644) #1

I want to solve this equation.

solve

and i make the CVX codes like this.

for i=1:iteration

cvx_begin
variable xh
variable yh
variable re
minimize(re)
subject to
sqrt( (x(i)-xh)^2 +(y(i)-yh)^2 ) <= re
0<=xh<=1
0<=yh<=1

cvx_end

end

but matlab said to me like this.

Disciplined convex programming error:
Invalid operation: sqrt( {positive convex} )

sqrt( (x(t)-xh)^2 +(y(t)-yh)^2 ) <= re

is there anyone who can solve this problem?

Thanks, regards.


(Mark L. Stone) #2

norm([x(i)-xh; y(i)-yh]) <= re