Mercurial > repos > public > sbplib
comparison +blockmatrix/zero.m @ 579:a5f1b0267dba feature/grids
Be less strict about what is considered a block matrix
Empty blocks of different sizes are now allowed as well as empty block dimensions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2017 09:21:04 +0200 |
parents | f0f4ca946068 |
children |
comparison
equal
deleted
inserted
replaced
578:1fe16b34f114 | 579:a5f1b0267dba |
---|---|
1 % Creates a block matrix according to the division with zeros everywhere. | 1 % Creates a block matrix according to the division with zeros everywhere. |
2 function bm = zero(div) | 2 function bm = zero(div) |
3 if ~blockmatrix.isDivision(div); | 3 if ~blockmatrix.isDivision(div) |
4 error('div is not a valid division'); | 4 error('div is not a valid division'); |
5 end | 5 end |
6 | 6 |
7 n = div{1}; | 7 n = div{1}; |
8 m = div{2}; | 8 m = div{2}; |