Look up .* (i.e. dot*), ./ and .^ for element by element actions. Replace the later part of your code by
x=linspace(0.5,1);
Vx=V1*cos(x);
Vy=V1*sin(x);
y1=(L4./(V1*cos(x)));
y2=((-g/2)*(L4./(V1*cos(x)).^2)+V1*sin(x).*(L4./(V1*cos(x)))+L3);
y3=Vb*(L4./(V1*cos(x)))+L1;
plot(x,y1,x,y2,x,y3),grid
xlabel('x'),ylabel('y')
legend('y1','y2','y3')
Best Answer