equation for projectile motion
14 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!