Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
converting displacement to velocity

Subject: converting displacement to velocity

From: mahesh bvm

Date: 6 May, 2011 17:16:05

Message: 1 of 2

I have a vector x which represents displacement over time. If I use the code diff(x), does it brings me the first derivative of the displacement i.e. velocity??. Else, Is there any other way to find velocity from the displacement??

Subject: converting displacement to velocity

From: dpb

Date: 6 May, 2011 17:29:35

Message: 2 of 2

On 5/6/2011 12:16 PM, mahesh bvm wrote:
> I have a vector x which represents displacement over time. If I use the
> code diff(x), does it brings me the first derivative of the displacement
> i.e. velocity??. Else, Is there any other way to find velocity from the
> displacement??

It's an approximation of the first derivative, sure...for it to be
displacement you'll have to account for the sampling frequency, etc., ...

As another poster (was it you?) just asked a day or so ago, there's
another thread that discusses some of the pitfalls worth looking at (the
obvious of any DC or low frequency component is one such).

One can also do things like fit (splines are useful here on occasion)
and differentiate them or similar "tricks"...

--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us