Thread Subject: help with cvx toolbox

Subject: help with cvx toolbox

From: david

Date: 9 Feb, 2012 16:16:17

Message: 1 of 2

Hi all,

I use the cvx matlab- based toolbox to solve the following LMI problem:
B =[0.3 ; -0.4] ;
G=[-0.0472 0.0539] ;
cvx_begin sdp
variable Q(1,2) ; % line vector
Q>=0;
[Q Q+G'*Q'*B' ;
 Q+B*G*Q Q ] >= 0;
Q >= 0;
 cvx_end
 cvx_status
 cvx_optval;

I get un error message "??? Error using ==> cvx.mtimes at 41
Inner matrix dimensions must agree"

could you please help me find the problem?

thanks in advance

David
'

Subject: help with cvx toolbox

From: Johan Lofberg

Date: 10 Feb, 2012 12:24:10

Message: 2 of 2

Your matrix algebra simply don't work

To begin with, you are creating a nonsymmetric matrix. You probably either mean

 [Q Q+Q'*G'*B' ;
 Q+B*G*Q Q ]

or

 [Q Q+G'*Q'*B' ;
  Q+B*Q*G Q ]

Still doesn't work though, your dimension arewrong. If you want Q to be psd, it has to be square at least. Impossible to get the dimensions to match in the expressions above.

"david" wrote in message <jh0rgh$ann$1@newscl01ah.mathworks.com>...
> Hi all,
>
> I use the cvx matlab- based toolbox to solve the following LMI problem:
> B =[0.3 ; -0.4] ;
> G=[-0.0472 0.0539] ;
> cvx_begin sdp
> variable Q(1,2) ; % line vector
> Q>=0;
> [Q Q+G'*Q'*B' ;
> Q+B*G*Q Q ] >= 0;
> Q >= 0;
> cvx_end
> cvx_status
> cvx_optval;
>
> I get un error message "??? Error using ==> cvx.mtimes at 41
> Inner matrix dimensions must agree"
>
> could you please help me find the problem?
>
> thanks in advance
>
> David
> '

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com