필터 지우기
필터 지우기

How to use Diff function in Displacement-time history

조회 수: 6 (최근 30일)
Muhsin
Muhsin 2018년 2월 14일
답변: Walter Roberson 2018년 2월 14일
Hello; I need some guidance to use diff function to get acceleration-time history from displacement-time history. I have looked up the 'diff' function, but the examples consists of only functions to be differentiated.
In my case, I have numeric data which is displacement and time in two columns. How can I use diff function in this case? First derivative of displacement (change in distance/ change in time) gives velocity, and second gives acceleration. Thank you

답변 (1개)

Walter Roberson
Walter Roberson 2018년 2월 14일
The numeric diff() function https://www.mathworks.com/help/matlab/ref/diff.html does not pay any attention to the spacing between entries.
You probably want to use gradient() instead.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by