Mercurial > repos > public > sbplib
comparison +blockmatrix/zero.m @ 207:d521e17f72b6 feature/grids
blockmatrix: Added function to create zero blockmatrices.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 15 Jun 2016 16:55:40 +0200 |
parents | |
children | f0f4ca946068 |
comparison
equal
deleted
inserted
replaced
206:50a323da7c7f | 207:d521e17f72b6 |
---|---|
1 % Creates a block matrix according to the division with zeros everywhere. | |
2 function bm = zero(div) | |
3 n = div{1}; | |
4 m = div{2}; | |
5 | |
6 N = length(n); | |
7 M = length(m); | |
8 | |
9 bm = cell(N,M); | |
10 | |
11 for i = 1:N | |
12 for j = 1:M | |
13 bm{i,j} = sparse(n(i),m(j)); | |
14 end | |
15 end | |
16 end |