Line | |
---|
1 | % Mdepthcol is column of JIM with depths which is spread by this |
---|
2 | % function to a submatrix with some zeros |
---|
3 | function submatrix = spread_depths_col(Mdepthcol,depthsIcol) |
---|
4 | |
---|
5 | m = size(depthsIcol,1); |
---|
6 | n = 1; |
---|
7 | |
---|
8 | known_depths = find(depthsIcol ~= 0); |
---|
9 | |
---|
10 | if ~isempty(known_depths) |
---|
11 | rows = k2i(known_depths); |
---|
12 | submatrix(rows,n) = Mdepthcol(rows); n=n+1; |
---|
13 | end |
---|
14 | |
---|
15 | for i=setdiff(1:m, known_depths) |
---|
16 | rows = k2i(i); |
---|
17 | submatrix(rows,n) = Mdepthcol(rows); n=n+1; |
---|
18 | end |
---|
19 | |
---|
Note: See
TracBrowser
for help on using the repository browser.