B
Burner
Member
- Awards
- 0
Ok, so i'm working on this problem:
A referee throws a jump ball vertically in the air. Besides the force
of gravity, the drag force acts on the ball. The drag force is given by
the product of the friction coefficient with the square of the velocity.
The friction coefficient is 0.1. The NBA ball mass is 0.6 kilograms. The
initial ball velocity is 10 meters/second. How much time does it take
for the ball to slow down to 2 meters/second?
So what I'm doing:
force balance:
Ma = Mg + Fd
where: Fd= kV^2
k/m=0.167
So:
x_double_dot = 9.8 + 0.167(x_dot)^2
Its been a while since i have done any programming, but i'm trying to use the ode45 command in matlab to solve it, however i'm doing something wrong, take a look:
(yprime.m first m file )
function dy = yprime(t,y)
dy = [y(2); 0.167 * y(2)^2 + 9.8];
(odedem.m this m file calls the yprime m file)
[t,Y] = ode45(@yprime, [0 10], [0 10])
plot(t,Y);
So right now i have t going from 0-10 and the initial condictions y(0)=0 and y'(0)=10
Can anyone at least point me in some direction (different method?), kinda stumped at the moment.
A referee throws a jump ball vertically in the air. Besides the force
of gravity, the drag force acts on the ball. The drag force is given by
the product of the friction coefficient with the square of the velocity.
The friction coefficient is 0.1. The NBA ball mass is 0.6 kilograms. The
initial ball velocity is 10 meters/second. How much time does it take
for the ball to slow down to 2 meters/second?
So what I'm doing:
force balance:
Ma = Mg + Fd
where: Fd= kV^2
k/m=0.167
So:
x_double_dot = 9.8 + 0.167(x_dot)^2
Its been a while since i have done any programming, but i'm trying to use the ode45 command in matlab to solve it, however i'm doing something wrong, take a look:
(yprime.m first m file )
function dy = yprime(t,y)
dy = [y(2); 0.167 * y(2)^2 + 9.8];
(odedem.m this m file calls the yprime m file)
[t,Y] = ode45(@yprime, [0 10], [0 10])
plot(t,Y);
So right now i have t going from 0-10 and the initial condictions y(0)=0 and y'(0)=10
Can anyone at least point me in some direction (different method?), kinda stumped at the moment.