Registered Member
|
I have a collection of vectors and I want to create a matrix using the vectors as the columns. I know about the comma initializer:
but I would want to do this in a loop, e.g.
but it won't let me because when trying to only write one vector into the matrix, there are not enough elements to fill the entire matrix (clearly). Is there a better way to construct this matrix from these vectors as columns without doing it element-wise? Thanks, David |
Registered Member
|
|
Registered Member
|
Yep, that'll do it, thanks! So I guess the << and 'operator,' are only for times when you have all of the matrix to create expressed as a very small number of simple expressions.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell