Thanks to all for the suggestions! I tried to give them all a fair shot at my real data. All the suggestions got me to my desired output, but the solution I marked as accepted ran very quickly. I liked the double-transpose solution as well, but it took well over an hour to run on my real data (as opposed to 3 minutes for the accepted solution). Thanks again.
... View more