Mercurial > repos > public > sbplib
comparison +blockmatrix/fromMatrixTest.m @ 707:0de70ec8bf60 feature/quantumTriangles
merge with feature/optim
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 10 Nov 2017 14:22:56 +0100 |
parents | a5f1b0267dba |
children |
comparison
equal
deleted
inserted
replaced
696:7c16b5af8d98 | 707:0de70ec8bf60 |
---|---|
44 { | 44 { |
45 [17 24], [1 8 15]; | 45 [17 24], [1 8 15]; |
46 [23 5; 4 6; 10 12; 11 18], [7 14 16; 13 20 22; 19 21 3; 25 2 9]; | 46 [23 5; 4 6; 10 12; 11 18], [7 14 16; 13 20 22; 19 21 3; 25 2 9]; |
47 }; | 47 }; |
48 }, | 48 }, |
49 { | |
50 { | |
51 magic(3), | |
52 {[1 0 2],[1 2 0]} | |
53 }, | |
54 mat2cell(magic(3),[1 0 2],[1 2 0]) | |
55 }, | |
56 { | |
57 { | |
58 zeros(0,1), | |
59 {0,1}, | |
60 }, | |
61 {zeros(0,1)} | |
62 }, | |
49 }; | 63 }; |
50 for i = 1:length(cases) | 64 for i = 1:length(cases) |
51 out = convertToFull(blockmatrix.fromMatrix(cases{i}{1}{:})); | 65 out = convertToFull(blockmatrix.fromMatrix(cases{i}{1}{:})); |
52 expected = cases{i}{2}; | 66 expected = cases{i}{2}; |
53 testCase.verifyEqual(out,expected); | 67 testCase.verifyEqual(out,expected); |