If I call a matlab function with: func(1,2,3,4,5) it works perfectly.
But if I do: a=[1,2,3,4,5] %(a[1;2;3;4;5
Just make the function take a single argument.
function result = func(a) if ~isvector(a) error('Input must be a vector') end end