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
回答(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!