Mercurial > repos > public > sbplib
changeset 479:c5705458beb1 feature/sublassable_cellarray
Implement end function and fix test for colon indexing
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 02 Aug 2017 11:19:10 +0200 |
parents | d91f27460741 |
children | 4ce12f8b561c |
files | Cell.m CellTest.m |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Cell.m Wed Aug 02 10:51:44 2017 +0200 +++ b/Cell.m Wed Aug 02 11:19:10 2017 +0200 @@ -35,6 +35,10 @@ l = length(A.data); end + function ind = end(A,k,n) + ind = builtin('end',A.data, k, n); + end + function B = transpose(A) b = A.data.'; B = callConstructor(A, b);
--- a/CellTest.m Wed Aug 02 10:51:44 2017 +0200 +++ b/CellTest.m Wed Aug 02 11:19:10 2017 +0200 @@ -104,11 +104,8 @@ C = Cell({1, 2, 3}); D = Cell({1; 2; 3}); - testCase.verifyEqual(C(:), Cell({3})); - - - testCase.verifyEqual(C(:), Cell({3})); - testCase.verifyEqual(C{end}, 3); + testCase.verifyEqual(C(:), D); + testCase.verifyEqual(D(:), D); end function testIndexreferenceCurly(testCase)