F=ma ODE solving matlab

조회 수: 4 (최근 30일)
Abdullaziz Errayes
Abdullaziz Errayes 2018년 5월 8일
댓글: Kurtis McIntosh 2018년 5월 8일
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
Abdullaziz Errayes 2018년 5월 8일
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