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 [ d_h ] = dprojectile_dtheta( v_mag,theta)
%Pojectile (Calculate the height of a dart projectile)
% Input variables velocity and theta are used to find final height.
%--------- Assign Constants -----------------------------------------------
d = 2.37; %distance to dartboard
h0 = 1.72; %initial height of dart
a = 9.81; %acceleration due to gravity
%--------- Operations -----------------------------------------------------
vx = v_mag*cosd(theta); %calculate x-component of velocity
vy = v_mag*sind(theta); %calculate y-component of velocity
x = linspace(0,d,d*100+1); %create row vector for x values
t = x/vx; %calculate time at given x value
dh_vector = vy + (-a)*t;
d_h = dh_vector(238);