comparison +blockmatrix/zero.m @ 832:5573913a0949 feature/burgers1d

Merged with default, and updated +scheme/Burgers1D accordingly
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 11 Sep 2018 15:58:35 +0200
parents a5f1b0267dba
children
comparison
equal deleted inserted replaced
831:d0934d1143b7 832:5573913a0949
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