comparison +blockmatrix/zero.m @ 886:8894e9c49e40 feature/timesteppers

Merge with default for latest changes
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 15 Nov 2018 16:36:21 -0800
parents a5f1b0267dba
children
comparison
equal deleted inserted replaced
816:b5e5b195da1e 886:8894e9c49e40
1 % Creates a block matrix according to the division with zeros everywhere.
2 function bm = zero(div)
3 if ~blockmatrix.isDivision(div)
4 error('div is not a valid division');
5 end
6
7 n = div{1};
8 m = div{2};
9
10 N = length(n);
11 M = length(m);
12
13 bm = cell(N,M);
14
15 for i = 1:N
16 for j = 1:M
17 bm{i,j} = sparse(n(i),m(j));
18 end
19 end
20 end