Hi,
I have a matrix (A) [i x j] and matrix B [j x j] where i is large (~80,000). I want only the diagonal terms of A*B*A' in an n-vector. Currently I use:
AB_var = diagonal(A * B * A')
This takes a very long time because it's also computing the non-diagonal entries, then extracting the diagonal. It seems inefficient to compute the whole ABA' matrix when I only need the diagonals.
Any thoughts?
Thanks guys!
-Eric
I have a matrix (A) [i x j] and matrix B [j x j] where i is large (~80,000). I want only the diagonal terms of A*B*A' in an n-vector. Currently I use:
AB_var = diagonal(A * B * A')
This takes a very long time because it's also computing the non-diagonal entries, then extracting the diagonal. It seems inefficient to compute the whole ABA' matrix when I only need the diagonals.
Any thoughts?
Thanks guys!
-Eric
Comment