Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
function[h]=projecile(v_mag,theta)
%help file for projectike
%this creates position of projectile using initial velocity and angle
%gives back the height of the object 2.37m for x
%calculate velocity in x direction with vx=cos(theta)*v_initial
vx= v_mag*abs(cosd(theta));
%calculate time until dart reaches x=2.37 where the board is located
%using x=vx*t <-> t=x/vx
%calculate velocity in y direction with vy=sin(theta)*v_initial
vy=v_mag*sind(theta);
%calculate the height of the dart at time t when it reaches the board
xdis= linspace(0,2.37,100);
time=linspace(0,(2.37)/(vx),100);
ydis=1.72+(vy*time)-(0.5*9.81*time.^2);
time_=(2.37)/(vx);
h= 1.72+(vy*time_)-(0.5*9.81*time_^2);
createplot
plot(s,t,x,y,u,v,p,q,a,b,d,e,xdis,ydis);
hold on
head(-0.2, 1.88, 0.1);
hold on
hold off
end