function [QQ t]=PolyTrajV(Q0,Qf,Qv0,Qvf,N,t0,tf)
t=linspace(t0,tf,N);

for i=1:length(Q0)
q0=Q0(i);
qf=Qf(i);
v0=Qv0(i);
vf=Qvf(i);

QQ(i,:)=q0+v0.*(t-t0)+((3/(tf-t0)^2)*(qf-q0)-(2/(tf-t0))*v0-(1/(tf-t0))*vf).*(t-t0).^2 + ((-2/(tf-t0)^3)*(qf-q0)+(1/(tf-t0)^2)*(vf-v0)).*(t-t0).^3;

end
end