Your v is an anonymous function. It has three input arguments.
In your f (also an anonymous function), there are v(t<0), v(0<=t & t<0.5), v(t==0.5) and v(t>=1). All just have one input argument. That is why it complains that the second input argument a is not provided.
Best Answer