1function c = wv_vec(v)
2% WV_VEC Wrap a vector so that jsonencode always produces an array.
3%
4% jsonencode(5) is 5 and jsonencode([5]) is also 5, so a per-method quantity
5% arrives on the JavaScript side as a bare number whenever a lab happens to
6% show one method. A cell array of scalars always encodes as an array.
7c = num2cell(v(:)');
8end