equation for projectile motion

17 次查看(过去 30 天)
andres
andres 2022-12-5
回答: Stephan 2022-12-5
hello im currenrty trying to find the displacement of a marbel falling of a ramp at 0.5 ft/s (Vi). the ramp varies anywhere from 0 to 30 degrees. it alsois 4 ft from i know that to use the kinematic equations i have to relate everything to time however i belive that my equation may be wrong because when i double check my work that data does not reflect that of the graph created in matlab. Below is a copy of my code...
clc
clear all
velocity=0.5;
figure;
hold on;
function d = projMotion(velocity,height,angle)
Vyi=velocity*sind(angle);
g=9.81;
tmax=(2*Vyi/g+sqrt((2*Vyi/g)^2+8*height/g))/2;
t=0:.001:tmax;
d=height+Vyi*t-.5*g*t.^2;
plot(t,d)
end
for height=4
for angle=0:1:30
d=projMotion(velocity,height,angle);
end
end

回答(1 个)

Stephan
Stephan 2022-12-5

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by