<< det | Linear algebra | eig >> |
Y = diff(X) |
Y = diff(X, n) |
Y = diff(X, n, dim) |
vector or matrix (real or single)
difference order: positive integer scalar or []
dimension: positive integer scalar
difference array: vector or matrix.
If X is a vector of length n, result of diff(X) is a vector of first differences X(2) - X(1), ..., X(n) - X(n-1).
If X is a matrix, result of diff(X) is a matrix of column differences along the first non-singleton dimension.
h = .01; x = 0:h:pi;
X = sin(x.^2);
R = diff(X)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET