f



Empty matrix and Diagonal matrix

Hi everyone
   I want to creat a large diagonal matrix.The main diagonal elements
of the diagonal matrix is a 3x3 matrix.
For example I have a matrix A(3x3),now I should obtain the diagnoal
matrix B(300x300),can anybody tell me how to do it? Deeply appreciate
your help!
Thank you in advance!
0
wmllwm (17)
9/21/2004 8:19:35 AM
comp.soft-sys.matlab 211266 articles. 19 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
415 Views

Similar Articles

[PageSpeed] 53

Nandy Erik wrote:
>
>
> Hi everyone
> I want to creat a large diagonal matrix.The main diagonal
> elements
> of the diagonal matrix is a 3x3 matrix.
> For example I have a matrix A(3x3),now I should obtain the diagnoal
> matrix B(300x300),
>Others I want to know how to create an empty matrix C(10x0).can
anybody tell me how to do these? Deeply
> appreciate
> your help!
> Thank you in advance!
>
0
wmllwm (17)
9/21/2004 8:30:24 AM
I'm not sure I understand what you want to do, but have a look at blkdiag.

Michael


"Nandy Erik" <wmllwm@hotmail.com> schrieb im Newsbeitrag
news:eeea88a.-1@webx.raydaftYaTP...
> Hi everyone
>    I want to creat a large diagonal matrix.The main diagonal elements
> of the diagonal matrix is a 3x3 matrix.
> For example I have a matrix A(3x3),now I should obtain the diagnoal
> matrix B(300x300),can anybody tell me how to do it? Deeply appreciate
> your help!
> Thank you in advance!


0
themiwi (854)
9/21/2004 8:32:52 AM
"Nandy Erik" <wmllwm@hotmail.com> wrote in message
news:eeea88a.-1@webx.raydaftYaTP...
> Hi everyone
>    I want to creat a large diagonal matrix.The main diagonal elements
> of the diagonal matrix is a 3x3 matrix.
> For example I have a matrix A(3x3),now I should obtain the diagnoal
> matrix B(300x300),can anybody tell me how to do it? Deeply appreciate
> your help!
> Thank you in advance!

>>help kron


0
9/21/2004 4:26:42 PM
> From Nandy Erik
> Hi Michael
> Sorry for I didn't clearly express my problem. But just with the
hints from you and Ken Davis, I solve the problem. With your help, I
learned how to use the command of 'diag' and 'blkdiag'; With Ken
Davis's help, I also learned how to operate the command of 'kron'. In
fact, I just want to create a matrix like the below codes generate:

> a = [1 2 3;4 5 6;7 8 9];
> b = diag(ones(1,100));
> c = kron(b,a);
>
> The last matrix,c,is what I want to get.
> Sorry again for my tongue language is not english.I will try my
best to improve my english level. So I sincerely hope that I can get
your help in the later.

> Thank you and Ken Davis!!!
>

Michael Wild wrote:
>
>
> I'm not sure I understand what you want to do, but have a look at
> blkdiag.
>
> Michael
>
>
> "Nandy Erik" <wmllwm@hotmail.com> schrieb im Newsbeitrag
> news:eeea88a.-1@webx.raydaftYaTP...
>> Hi everyone
>> I want to creat a large diagonal matrix.The main diagonal
> elements
>> of the diagonal matrix is a 3x3 matrix.
>> For example I have a matrix A(3x3),now I should obtain the
> diagnoal
>> matrix B(300x300),can anybody tell me how to do it? Deeply
> appreciate
>> your help!
>> Thank you in advance!
>
>
>
0
wmllwm (17)
9/22/2004 2:47:31 AM
Reply: