How can I get acceleration from this equation?

1 回表示 (過去 30 日間)
Yun seon Jang
Yun seon Jang 2018 年 4 月 25 日
function [hdot] = func2(t,h)
m = 55.6*10^(-3);
r = 0.0025/2;
D = 0.5;
A = pi*r^2;
V = (4/3)*pi*r^3;
a = 6348.1370*10^3;
b = 6356.7523*10^3;
l = 35.8899097;
M = 5.9736*10^24;
R = ((((a^2)*cos(l))^2 + ((b^2)*sin(l))^2)/((a*cos(l))^2 + (b*sin(l))^2))^(1/2);
g = M/(R + h(1))^2;
p0 = 1.2754;
p = p0*((1-((0.0065*h(1))/288))^4.265);
hdot(1,1)=h(2);
hdot(2,1)=(m*g-(1/2)*D*p*A*((h(2))^2)-V*p*g)/m;
return
%%%%%%[t,h]=ode45(@func2,[0 1], [2.60 0]);
%%%%%%plot(t,h(:,1))
Hello!
I just tried to make free-fall equation and this is the equation I made. the codes after '%%%%%' is the codes I wrote on command window. hdot(1,1) is velocity and hdot(2,1) is the accelation...
When I wrote this code at first, I only tried to find the position (h(1))... but for some reason, I need to find acceleartion too....
Since I don't know well about matlab (I have just started to solve this problem...), I cannot find out how to change this code to get acceleration hdot(2,1)....
Could someone please help me...? Thank you...!

回答 (0 件)

カテゴリ

Help Center および File ExchangePhysics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by