Mercurial > repos > public > sbplib
diff +blockmatrix/zero.m @ 211:3c4ffbfbfb84 feature/beams
Merged feature/grid into feature/beams
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 16 Jun 2016 10:56:47 +0200 |
parents | d521e17f72b6 |
children | f0f4ca946068 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+blockmatrix/zero.m Thu Jun 16 10:56:47 2016 +0200 @@ -0,0 +1,16 @@ +% Creates a block matrix according to the division with zeros everywhere. +function bm = zero(div) + n = div{1}; + m = div{2}; + + N = length(n); + M = length(m); + + bm = cell(N,M); + + for i = 1:N + for j = 1:M + bm{i,j} = sparse(n(i),m(j)); + end + end +end