Define variable

(Bollion-kok) #1

variable be a complex matrix? If so, how do I define this variable.
Thank you

(Mark L. Stone) #2

Use the complex keyword, as explained at http://cvxr.com/cvx/doc/basics.html#variables .

(Bollion-kok) #3

variable x (m,n) complex
Just like this. I used complex keyword,but it showed Invalid structure specification: (m,n)

(Mark L. Stone) #4

That error is due to the space between x and (m,n)

variable x(m,n) complex
will work, provided m and n already have positive integer values.

(Bollion-kok) #5

Mark,I give the integer values to m and n, just like this
cvx_begin
m=512; n=20
variable x (m,n) complex;

cvx_end
but the error still exists , ''Invalid structure specification: (m,n)"
so I don’t know what caused it appearance .

Thank you

(Mark L. Stone) #6

Your code still has a space between
x
and
(m,n)

You need to remove that space.

(Bollion-kok) #7

Thank you , Mark . My problem was solved perfectly.