F=ma ODE solving matlab

4 次查看(过去 30 天)
I need to Write a function into which you pass the end time and time step size that returns the time and speed arrays for the following problem. A car initially at rest, speed equals 0.0 m/s, is accelerated along a runway located at sea level. The mass of the car is 1000 kg, the coefficient of drag is 0.5 and the front area of the car is 2.0 m2 . The thrust, in Newtons, provided by the engines is given by the following equation T=10000*t t<1, T=10000 1<=y<=50, T=0 t>50. Small t is time and big T is thrust and the friction is between car and runway is 200N the ODE is F=ma how do i go about doing this question?

采纳的回答

Kurtis McIntosh
Kurtis McIntosh 2018-5-8
编辑:Kurtis McIntosh 2018-5-8
m = 1000
F = T - D
(T-D)/1000 = a
V = a*dt
T - cd*rho*V^2*A = 1000*dV/dt
1000*dV/dt + cd*rho*V^2*A - T = 0
The very end is your ODE where T will be a cell array characterized by your set of equations for thrust vs time. I assume you know how to do that. Once you have everything set up, you can have your pick from a number of different ODE solvers within MATLAB or you can program your own using Euler's method since this is a first order ODE.
  2 个评论
Abdullaziz Errayes
thank you very much, however because i am a transfer from a different course i have little to no experience with the programming language so this is all new to me and i am quite lost haha
Kurtis McIntosh
Kurtis McIntosh 2018-5-8
I would just use the euler method. Here is a link to a step-by-step guide on how to implement it where you know your function. Euler Method - MATLAB

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by