Take 1st and 2nd Derivative of Data Points

조회 수: 158 (최근 30일)
Daniel Koziel
Daniel Koziel 2019년 10월 2일
편집: Rohit Garud 2020년 8월 16일
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
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
Nadir Altinbas 2019년 10월 24일
Data should be in matrix form and then matrix regular operations apply

댓글을 달려면 로그인하십시오.

답변 (1개)

Rohit Garud
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(:))

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by