# How to solve high-dimension QCQP problem?

Now I have a high-dimension QCQP problem.

x is a high-dimension matrix.
I need to solve this problem so I can have different row matrix.
But the result is a matrix which each row is same.

x=[1,0.5;1,0.5]

This is my code.

``````cvx_clear

m=4;
f=1;
k=2;

z = 10*rand(m,k);
data=[0,0;1,1;0,1;1,2];

cvx_begin
variable x(k,f+1)
variable y(m,k+1)
minimize( sum(y(:,1)) + sum(sum(power(y(:,2:k+1),2)-z)) + sum(sum(power((x(:,1:f)*data(:,1:f)'+repmat(x(:,f+1),1,m)-repmat(data(:,f+1)',k,1)),2)-z'))   )
subject to
power(y(:,2:k+1),2)-z<=0;
power((x(:,1:f)*(data(:,1:f)')+repmat(x(:,f+1),1,m)-repmat(data(:,f+1)',k,1)),2)-z'<=0;
(-1)*y(:,1)<=0;
repmat(y(:,1),1,k)-y(:,2:k+1)<=0;
cvx_end``````

It might have nothing to do with high dimension or low dimension, CVX will solve them anyway. Maybe it should be the same, we don’t know your problem too well and your data are randomly generated. and please re-format your code in Markdown format (per How do I include Matlab source code in forum posts?) so it be runnable.

Thanks for your reply. I have finished it so you can run it.

Try

``````z =

[ 1.8047    0.0886;
9.3060    6.7159;
0.4515    9.0481;
2.4065    5.7242]
``````

you’ll get a different result.
Note that y and x are un-related variables in your problem. and your problem looks simple, I’m not sure if there is a close-form solution to it.

Thank you very much. It helps me a lot. Besides, How did you find the value of Z?