Take 1st and 2nd Derivative of Data Points

178 visualizaciones (últimos 30 días)
Daniel Koziel
Daniel Koziel el 2 de Oct. de 2019
Editada: Rohit Garud el 16 de Ag. de 2020
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 comentarios
Alex Mcaulley
Alex Mcaulley el 2 de Oct. de 2019
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 el 24 de Oct. de 2019
Data should be in matrix form and then matrix regular operations apply

Iniciar sesión para comentar.

Respuestas (1)

Rohit Garud
Rohit Garud el 16 de Ag. de 2020
Editada: Rohit Garud el 16 de Ag. de 2020
You can use the gradient() function
data_first_d = gradient(data_out(:)) ./ gradient(t(:))
data_second_d = gradient(data_first_d(:)) ./ gradient(t(:))

Categorías

Más información sobre Tables en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by