Date  File  Comment by  Comment  Rating 

05 Nov 2013  sumDiag Sum over each diagonal (or antidiagonal) in a matrix  Marcus Björk  That's true Sven. I added 3D matrix support now, if anyone has an application for that.


02 Nov 2013  sumDiag Sum over each diagonal (or antidiagonal) in a matrix  Marcus Björk  Forgot to mention: If you need to compute the sum of diagonals for several matrices of the same size (in another loop), which was the application at hand, this forloop free implementation is also faster (well, the inlined version). See below: Test code:
%Common
%% Method 1
for k=1:K
%% Method 2
for k=1:K
>>


02 Nov 2013  sumDiag Sum over each diagonal (or antidiagonal) in a matrix  Marcus Björk  Thanks for your comment Sven!
Furthermore, you don't get the antidiagonals by transposing. But rot90(A) works and is almost as fast as using the extra input. 

01 Nov 2013  Vandermonde matrix, vander() function extension Adds functionality to the original MATLAB vander() function.  Marcus Björk  Thanks for the comments guys! Indeed, its a bad idea to REPLACE vander with this function, so I changed the name and made a note in the text. However, one of the points was to use the normal definition, so I won't change that. I also added bsxfun instead of the forloop, that was just bad... 
