to define a matrix which is not a variable

31 views
Skip to first unread message

Rahul Radhakrishnan

unread,
Mar 20, 2013, 8:08:55 AM3/20/13
to yal...@googlegroups.com
i need to define a matrix which is of the form A'=[A B 0 0 D], where A is of order 2x2, B of order 2x2 and D of order 2x1. all are system matrices and are available. i cant use blkvar right???? order of zero blocks are also 2x2.

Johan Löfberg

unread,
Mar 20, 2013, 10:19:37 AM3/20/13
to yal...@googlegroups.com
No, you cannot use blkvar here since the 0-blocks are not uniquely determined (they could be 2x1, 2x2,2x3,...)

Absolutely no reason to use blkvar though (I never use it). Simply define the matrix using standard code

A= sdpvar(2,2,'full')%Or symmetric?
B= sdpvar(2,2,'full')%Or symmetric?
D= sdpvar(2,1)
Aprime =[AB zeros(2,4) D];


Rahul Radhakrishnan

unread,
Mar 20, 2013, 1:22:25 PM3/20/13
to yal...@googlegroups.com
sir A,B & D are not variables, they are known matrices. zero blocks should be of order 2x2, so that dimensions are matched.
using standard code, i have checked, but error is there.
Aprime is a 1x5 matrix in appearance.
since A is 2x2, B is 2x2 & D is 2x1 and zeros(2x4), Aprime order should be 2x9.
how should i define it sir??

Johan Löfberg

unread,
Mar 20, 2013, 1:26:45 PM3/20/13
to yal...@googlegroups.com
So what is the problem? Just concatenate your data matrices and you are done, or show some code, with error messages which illustrates you issues
Reply all
Reply to author
Forward
0 new messages