Professional Documents
Culture Documents
MINOR PROJECT
GROUP MEMBERS
f =ma
m(v s h oot −v 0 )
f=
t shoot
f . v s h oot
v s h oot =v 0+
m
The horizontal and vertical components of the velocity vector are computed as
v x =v s h oot cos θ
v=√ v x2 + v y 2
1
y=v s h oot t sin θ− g t 2
2
The positive root will be determine as the time of flight of a projectile motion
which is the time from when the object is projected to the time it reaches the
surface given by
1 2
g t −v s h oot t sin θ+ y =0
2
The maximum horizontal range can be obtain by
h=¿ ¿
The time taken for the basketball reach maximum height can be obtain by
v s h oot sin θ
t h=
g
v final =v s h oot −g t ❑
PROGR AM LISTING
balmass=3.0; tshoot=0.5;
vshoot=tshoot.*(force./balmass);
rad = pi*th/180;
h_max=y0+((vy0^2)/(2.*g));
max_x=vx0*tflight;
th_max=vy0./g;
f_vel=vshoot-g.*tflight;
yhit=5;
axis equal
t=linspace(0,thit,50);
axis([0 10 0 10])
hold on;
plot([8-.35,8+.35],[5,5],'r-','LineWidth',2)
plot([8+.30,8+.30],[0,6],'k','LineWidth',3)
for i=1:size(x,2)
break;
end
plot(x(i),y(i),'b.');
hold on;
ang=linspace(0,2.*pi,100);
xb=x(end)+br.*cos(ang); yb=y(end)+br.*sin(ang);
fill(xb,yb,'g')
pause (0.02);
end
hold on;
plot([8+.30,8+.30],[0,6],'k','LineWidth',3)
if (x(end)>7.65 && x(end)<8.4)
else
end
Command window
Conclusion that can be made of using MATLAB for solving projectile motion
are :
1. https://courses.lumenlearning.com/physics/chapter/3-4-projectile-motion/
2. https://www.toppr.com/guides/physics/motion-in-a-plane/projectile-motion/
3. https://au.mathworks.com/matlabcentral/answers/308853-how-do-i-create-a-
projectile-motion-function-with-the-input-of-angle-which-is-scalar-and-time-which