comparison +blockmatrix/zero.m @ 427:a613960a157b feature/quantumTriangles

merged with feature/beams
author Ylva Rydin <ylva.rydin@telia.com>
date Thu, 26 Jan 2017 15:59:25 +0100
parents f0f4ca946068
children a5f1b0267dba
comparison
equal deleted inserted replaced
426:29944ea7674b 427:a613960a157b
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