If you know the horizontal distance of your vector, you can use trapz to integrate it without a function. For example, to integrate y=sin(x)from 0 to pi with 358 partitions,
x=0:pi/357:pi;
y=sin(x);
area=trapz(x,y);
trapz(y), , , 1. x:
area=pi/357*trapz(y);