Solve Second Order ODE Numerically
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am having trouble solving this second order ODE using MATLAB. We are supposed to use the secant iteration method or runge-kutta method, or numerical method. I dont know where to begin besides what I have here.
A target is 1200 meters away. A ball is launched with an initial velocity of 150m/s with unknown angle. Air resistance is involved. Find the angle the ball was launched at. b is the constant for air resistance, and the other parameters are given below.
clear all;
%initial conditions
%vo*cos(theta)=vx(0)
%vo*sin(theta)=vy(0)
%Equation of motion with friction
% m(d/dt)^2(vx)=-b*sqrt(vx^2 + vy^2)
% m(d/dt)^2(vy)=-b*vo*sin(theta)-m*g
xf=1200
vo=150
b=(.5)*(.009)*1.2*.5
g=-9.8
m=5
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!