Mercurial > repos > public > sbplib
view spdiag.m @ 1190:79618b58b0a0 feature/rv
Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 08 Jul 2019 15:12:19 +0200 |
parents | e76321b89c1e |
children |
line wrap: on
line source
function A = spdiag(a,i) default_arg('i',0); if isrow(a) a = a'; end n = length(a)+abs(i); A = spdiags(a,i,n,n); end