I need to solve and plot time, acceleration, velocity, and dsiplacement using a force equation that is in terms of Velocity.
6 次查看(过去 30 天)
显示 更早的评论
I would like to have time as my input and A,V,S as outputs. The changing acceleration causes the real headache. Here is my current code but I dont beleive that it is calculating the way that it should. I am using this to find quarter mile time and speed and 0-60 time .
Power = 125*(10^3); %kW
af = 2.21; %frontal area
m = 1407.497; %mass of the vehicle
rho = 1.225; %density of air
cd = .30; %Coeff of Drag res
cr = .03; %Coeff of roll res
g = 9.81; %gravity
t = 0:.1:40;
v = a.*t
F = (Power./v) - .5*rho*(v.^2)*af*cd - cr*m*g;
a = F/m;
S = v.*t +1/2*a*t.^2;
1 个评论
James Tursa
2019-2-20
This is typically done in a loop, where you incrementally integrate acceleration into velocity, and velocity into position. You can't do it the way you currently have coded. E.g., that v = a.*t line will not work at all since you don't know "a" at that point.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!