Numerical Differentiation of Data (derivative)
Version 3.0.3 (383 KB) von
Tamas Kis
Numerical differentiation of data (i.e. arrays) over the domain of the data or at specified points.
derivative
Numerical differentiation of data (i.e. arrays).
Syntax
dy = derivative(x,y)
dy = derivative(x,y,x_star)
Description
dy = derivative(x,y) returns the derivative of a set of data, vs.
(which are stored in
y and x). dy stores the derivative of y vs. x at every point in x.
dy = derivative(x,y,x_star) returns the derivative of a set of data, vs.
(which are stored in
y and x), at the set of points specified by (
x_star). x_star can be a scalar or a vector.
Additional Notes
- This function is the equivalent of
trapzandcumtrapzfor numerical differentiation and is especially useful for estimating derivatives where the underlying function is unknown (i.e. we have some data setvs.
that describes a function
, but this underlying function
is unknown and so we use the data set to approximate its derivative).
- If we do know the underlying function
, then we can still use
derivativeto estimate its derivative. We can do this by defining a vector of pointsxand then populating a vectorywith evaluations ofat every point in
x. However, in this case (where the underlying function is known),iderivativeandderivestare better functions to use.
Examples and Additional Documentation
- See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.
- See "Basic_Numerical_Calculus.pdf" (also included with download) for the technical documentation.
Zitieren als
Tamas Kis (2026). Numerical Differentiation of Data (derivative) (https://github.com/tamaskis/derivative-MATLAB/releases/tag/v3.0.3), GitHub. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2021a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.
Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.
