ODE45 Code Application
Ältere Kommentare anzeigen
M = 100/6*pi*0.04^3; g=9.8; A=0.25*pi*0.04^2;
Re = @(U) 1.25*0.04*U/0.000015;
CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6);
function Udot = Velocity(t,U)
Udot = g -(0.5*1.25*U^2*A*CD)/M;
[t,U]=ode45 (@Velocity, [0, 20], 0);
plot(t,U)
end
I'm in agony with this coding for 5hours..... I can solve easy function but it is very complicate function for me. I'm confused how to make up 'Re' 'CD' coding clearly.
Thanks for reading.. how could I get right plotting?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!