Mercurial > repos > public > sbplib
comparison stripeMatrix.m @ 358:5cb99f56f55e
Added some utility functions. Improved some documentation.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 05 Dec 2016 13:31:57 +0100 |
parents | 0be702829bb9 |
children |
comparison
equal
deleted
inserted
replaced
303:f18142c1530b | 358:5cb99f56f55e |
---|---|
1 % Creates a matrix of size n,m with the values of val on the diagonals diag. | 1 % Creates a matrix of size n,m with the values of val on the diagonals diag. |
2 % A = stripeMatrix(val,diags,n,m) | |
2 function A = stripeMatrix(val,diags,n,m) | 3 function A = stripeMatrix(val,diags,n,m) |
3 default_arg('m',n); | 4 default_arg('m',n); |
4 | 5 |
5 D = ones(n,1)*val; | 6 D = ones(n,1)*val; |
6 A = spdiags(D,diags,n,m); | 7 A = spdiags(D,diags,n,m); |