Mercurial > repos > public > sbplib
view diags.m @ 910:b9c98661ff5d feature/utux2D
Change the name of the last interface method argument from type to opts in all schemes.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Fri, 23 Nov 2018 20:39:40 -0800 |
parents | 0b87863cb29c |
children |
line wrap: on
line source
function A = diags(B,d,m,n) assert(size(B,1) == m); A = repmat(B(:,1)*0, [1, n]); for i = 1:size(B,2) A(:,d(i)+ (1:m)) = A(:,d(i)+ (1:m)) + diag(B(:,i)); end end