Mercurial > repos > public > sbplib
view +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 |
line wrap: on
line source
% 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