Compute the velocity of a free-falling parachutist using Euler's method for the case where m = 80 kg and cd=0.25 kg/mPerform the calculation from t = 0 to 20 s with a step size of 1 s.

30 次查看(过去 30 天)
full problem: Compute the velocity of a free-falling parachutist using Euler's method for the case where m = 80 kg and cd=0.25 kg/mPerform the calculation from t = 0 to 20 s with a step size of 1 s. Use an initial condition that the parachutist has an upward velocity of 20 m/s at t = 0. At t = 10 s, assume that the chute is instantaneously deployed so that the drag coefficient jumps to 1.5kg/m
--im supposed to use this equation velocity= v(t)+(g-(cd/m)*(v*abs(v)))*t;
but i dont know how to make into a function and make it repeat for each time variable from 1 to 20 sec.

回答(1 个)

James Tursa
James Tursa 2017-1-24
编辑:James Tursa 2017-1-24
Here is an outline to get you started:
---> constant stuff goes here <---
t = 0:1:20; % The time values (s)
n = numel(t); % The number of time values
v = zeros(1,n); % The velocity values (m/s)
v(1) = 20; % The initial velocity value (m/s)
for k=1:n-1 % For each subsequent time value
something = _____; % The delta-velocity stuff based on your equation and the time t(k)
v(k+1) = v(k) + something; % The Euler step
end
So in your case, you need to fill in the "something" stuff. Set up your constants etc at the beginning of your code. Then inside the loop, you will need an if-test based on the current value of t(k) to determine the value of the drag coefficient to use in your "equation". You should double check your listed equation above since it doesn't look quite right (e.g., the *t part).

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by