source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/merge_matrices.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 401 bytes |
Line | |
---|---|
1 | function M = merge_matrices(M1,M2) |
2 | % Opposite of split_matrix. Recombines. |
3 | [numrows1, numcols1] = size(M1); |
4 | [numrows2, numcols2] = size(M2); |
5 | if numrows1 ~= numrows2; |
6 | error('Matrices must have equal number of rows.'); |
7 | end |
8 | if numcols1 ~= numcols2; |
9 | error('Matrices must have equal number of columns.'); |
10 | end |
11 | |
12 | M = ones(numrows1+numrows2,numcols1); |
13 | M(1:2:2*numrows1,:) = M1; |
14 | M(2:2:2*numrows1,:) = M2; |
Note: See TracBrowser
for help on using the repository browser.