Time for Distance with variable velocity

Hi!
I have an object that is moving towards a wall. The closer it gets to the wall the slower it gets, but it reaches the wall with a certain velocity (it does not stop at the wall).
So the velocity is depending on the distance to the wall: v(x) = K*(x^2) where K is a constant.
At the beginning, the object is located with the distance L to the wall. How can I calculate how long it takes for the object to reach the wall? I know the function of the velocity.
Is there a fast way to solve that in matlab?
Thanks very much!

댓글 수: 3

Teja Muppirala
Teja Muppirala 2011년 3월 8일
You said "it reaches the wall with a certain velocity (it does not stop at the wall)"
However
v(x) = K*x^2 <--- This equals zero at the wall (v(0) = 0).
Can you clear up this miscommunication?
Paulo Silva
Paulo Silva 2011년 3월 8일
If the starting point is L units from the wall than v(0)=0 should be your velocity at the wall, now it depends on the kind of motion, see http://en.wikipedia.org/wiki/Equations_of_motion , find the position equation that fits your motion and substitute the position values and speed, that will get you the time.
Steve
Steve 2011년 3월 8일
Hi, I'm sorry, you're right. My Problem is correctly described like this:
At the beginning the object is located with the distance L (e.g. 100m) to the wall. When does it reach the distance D (e.g. 30m) from the wall.
Sorry for the confusion!

댓글을 달려면 로그인하십시오.

 채택된 답변

the cyclist
the cyclist 2011년 3월 8일

0 개 추천

This seems like a straightforward calculus problem, so I am not sure why you are trying to solve it in MATLAB. Is this homework for a MATLAB class? If so, I suggest you show us what you've managed to do so far in trying to solve it.
If this is homework in a calculus or physics class, I suggest you find a forum for help in those subjects.
Finally, you might want to check that you have the problem statement correct. I calculate that to go from a distance L1 to a closer distance L2, it will take
T = (1/L2 - 1/L1)/K
which goes to infinity as L2 approaches 0 (i.e. the wall).
I could be wrong, though. Been a long while since I've taken calculus (or even used it much).

댓글 수: 3

Steve
Steve 2011년 3월 8일
Hi, thanks for your answer. No, this is not for any class. I'm working on a project for myself but unfortunately I don't know how to solve this. So I thought there might be a standard function in matlab to do this.
I've described my problem a little bit wrong, correctly it must be:
At the beginning the object is located with the distance L (e.g. 100m) to the wall. When does it reach the distance D (e.g. 30m) from the wall.
Are you sure that your solution is correct? I've tried to solve the differential equation v=-k*x^2 (the minus because it gets slower). That would give me for x(t)=1/(k*t+1/L) and for the time in my case t=(1-(x/L))/(k*x), where I set x=30 and L=100.
Is that correct?
the cyclist
the cyclist 2011년 3월 9일
Pretty sure that your answer and mine are equivalent. (I just used different variable names.)
Steve
Steve 2011년 3월 9일
I just checked it.. you're right. The equation for t is
t = ((1/x)-(1/L))/k.
Thanks very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2011년 3월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by