Prev: merge two diagonal matrix
Next: Memory issue with large matrix multiplication, only one row of result needed
From: Jos (10584) on 8 Apr 2010 10:42 "dafina " <d.xhako(a)gmail.com> wrote in message <hpj38j$h12$1(a)fred.mathworks.com>... > How can I merge two diagonal matrix in matlab wtih different dimensions, for example the first one is 6x6 and dhe second is 194x194, in one that is 200x200 > > thnx help diag % create two diagonal matrices (accidently using diag as well) A = diag(1:2) B = diag([11 12 13]) % engine: % extract diagonals and concatenate and % put them on the diagonal C = diag([diag(A) ; diag(B)]) or do you mean something different with the word "merge" hth Jos
First
|
Prev
|
Pages: 1 2 Prev: merge two diagonal matrix Next: Memory issue with large matrix multiplication, only one row of result needed |