Given the problem
How could one formulate it in CVX?
I could handle it without the sqrt yet couldn’t do it in this form.
Thank You.
Given the problem
How could one formulate it in CVX?
I could handle it without the sqrt yet couldn’t do it in this form.
Thank You.
Hi @Mark_L_Stone, well, I could rewrite the problem as:
Where the matrix {B}_{i} extracts a vector such that
This must be Convex.
Thank You.
Hi @Mark_L_Stone,
That’s the issue, I don’t know how to insert the Loop into CVX.
It can’t be written in one minimize argument.
Thank You.
cvx_begin
variable x(n)
Objective = 0.5*sum_square(x-y)
for i=1:n-2
Objective = Objective + norm([x(i)-x(i+1);x(i+1)-x(i+2)])
end
minimize(Objective)
% insert any other constraints
cvx_end
Hi @Mark_L_Stone,
It really solved it.
I wasn’t aware it can be done that way (Looping inside CVX Block).
Is there a way to mark question as solved?
Thank You.
There is no marking questions as solved in this forum. Your post stating that it is solved will accomplish that purpose for readers.
Well,
This question is solved.
CVX is really awesome.
Just need better support for large size arrays.
Now that you have some experience with CVX, perhaps you should re-read the CVX Users’ Guide, so that you can pick up on things which you didn’t fully absorb the first time.
The guys over Julia are using the same forum and have it working.
Maybe they could assist?