I have to create an n x n matrix with 199, 409, 619,....210n-11 down the diagonal and zeros everywhere else.
I\'m looking for a Pythonic way to get all the diagonals of a (square) matrix, represented as a list of lists.
I have an M-by-M-by-N matrix, which is a concatenation of N M-by-M matrices. I want to reduce this matrix to an M-by-N matrix by taking the diagonals of each M-by-M submatrix and concatenating them to
Short Version How can I do concatMap in MATLAB? I\'m trying to build a single vector from a series of smaller, differently sized vectors. I know I can do:
Is there a way in Octave to compute and store only the diagonal of a matrix product? Basically like doing: vector = diag(A*B);