Derivative of vector wrt time vector
58 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jerry
am 8 Aug. 2012
Kommentiert: Rusty
am 17 Jan. 2015
if i have a vector x=[0 6 7 7.....] and this x is measure with respect to a time vector then how can we find the derivative like dx/dt like the simulink block has the drivative, which computes with respect to simulation time but what can be done i case of MATLAB how this time vector can be differentiated with the x vector becasue both contain values. Any idea will be appreciated.
1 Kommentar
Akzeptierte Antwort
Kevin Claytor
am 8 Aug. 2012
A simple brute force numerical derivative would be find the change in x and divide by the change in t;
dx = x(2:end) - x(1:end-1);
dt = t(2:end) - t(1:end-1);
v = dx./dt
5 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!