How to use Diff function in Displacement-time history
6 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!