Mercurial > repos > public > sbplib
comparison +blockmatrix/toMatrix.m @ 781:69ab0e69f972 feature/interpolation
Merge with feature/grids
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 24 Jul 2018 20:14:29 -0700 |
parents | 2501067f2fc7 |
children |
comparison
equal
deleted
inserted
replaced
751:005a8d071da3 | 781:69ab0e69f972 |
---|---|
10 N = sum(n); | 10 N = sum(n); |
11 M = sum(m); | 11 M = sum(m); |
12 | 12 |
13 A = sparse(N,M); | 13 A = sparse(N,M); |
14 | 14 |
15 n_ind = [0 cumsum(n)]; | |
16 m_ind = [0 cumsum(m)]; | |
17 | |
18 for i = 1:size(bm,1) | 15 for i = 1:size(bm,1) |
19 for j = 1:size(bm,2) | 16 for j = 1:size(bm,2) |
20 if(isempty(bm{i,j})) | 17 if isempty(bm{i,j}) |
21 bm{i,j} = sparse(n(i),m(j)); | 18 bm{i,j} = sparse(n(i),m(j)); |
22 end | 19 end |
23 end | 20 end |
24 end | 21 end |
25 A = cell2mat(bm); | 22 A = cell2mat(bm); |