annotate assertLength.m @ 1069:7a55a72729e6 feature/laplace_curvilinear_test

Copy-paste updates from LaplCurvNewCorner to LaplCurvNew, and then modify the corner part.
author Martin Almquist <malmquist@stanford.edu>
date Wed, 23 Jan 2019 17:11:48 -0800
parents 1d70f29c7ab2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
987
1d70f29c7ab2 Add assertLength
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
1 function assertLength(A,l)
1d70f29c7ab2 Add assertLength
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 assert(isvector(A), sprintf('Expected ''%s'' to be a vector, got matrix of size %s',inputname(1), toString(size(A))));
1d70f29c7ab2 Add assertLength
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 assert(length(A) == l, sprintf('Expected ''%s'' to have length %d, got %d', inputname(1), l, length(A)));
1d70f29c7ab2 Add assertLength
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 end