Mercurial > repos > public > sbplib
comparison stripeMatrix.m @ 361:4a5d83324ec1 feature/hypsyst
Meged with default
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 08 Dec 2016 13:38:04 +0100 |
parents | 5cb99f56f55e |
children |
comparison
equal
deleted
inserted
replaced
356:9567a9dd220d | 361:4a5d83324ec1 |
---|---|
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); |