MATLAB Answers

0

How can I do this operation fast and simply?

Asked by Sinwoo Jeong on 31 Oct 2018
Latest activity Commented on by Stephen Cobeldick on 31 Oct 2018
I have a matrix [M], [N] having the shapes as in the image I've referred.
What I want to get is a matrix [P] (in the image).
I've found that [P] can be obtained by diagonalizing the matrix [N] like [N]* and multiplying it with the matrix [M].
However, it takes a lot of time and memory for diagonalizing the matrix [N] like [N]*.
Do we have a special MATLAB operator to get a matrix [P] in my example?

  2 Comments

You have lots of [] and {} notation in your post that is unclear. Are [A], [B], [C],... matrices? What are {a},{b},{c},....
"How can I do this operation fast and simply?"
Probably one simple loop with a preallocated output.

Sign in to comment.

1 Answer

Answer by Matt J
on 31 Oct 2018

P=kron(N,M);

  2 Comments

Thank you for your comment. But, kron does not give me a correct answer. It gives me something but the size of the matrix is wrong. I think I need to study it more.
What you need to do is be a lot clearer about what you want. Your invented notation is not. A numerical example would be useful.

Sign in to comment.