Take 1st and 2nd Derivative of Data Points
94 ビュー (過去 30 日間)
古いコメントを表示
I am having issues taking the derivative of experimental data. I have a vector (data_out) that is 2000x1 with experimental data inside. I want to take the 1st and 2nd derivative of this data with respect to a time vector (time) that is 2000x1. I've tried using gradient and diff functions in matlab but I have been unsuccessful.
4 件のコメント
Alex Mcaulley
2019 年 10 月 2 日
1stD is not a valid name for a variable. From Matlab documentation:
Valid names begin with an alphabetic character, and can contain letters, numbers, or underscores
Nadir Altinbas
2019 年 10 月 24 日
Data should be in matrix form and then matrix regular operations apply
回答 (1 件)
Rohit Garud
2020 年 8 月 16 日
編集済み: Rohit Garud
2020 年 8 月 16 日
You can use the gradient() function
data_first_d = gradient(data_out(:)) ./ gradient(t(:))
data_second_d = gradient(data_first_d(:)) ./ gradient(t(:))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で External Language Interfaces についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!