function projectileBallSolution2
initialVelocity = 5; % m/s
launchAngle = 30; % degrees
launchAngle = launchAngle/180*pi;
Vx = initialVelocity * cos(launchAngle);
Vyo = initialVelocity * sin(launchAngle);
g = 9.81;
endTime = 2*Vyo/g; % No need for a loop to find the end time in this problem
t = 0:0.01:endTime;
x = Vx*t;
y = Vyo * t - 1/2*g*t.^2;
plot(x,y,'m+')
axis equal
end
