5 lines
83 B
Matlab
5 lines
83 B
Matlab
function dy = deriv(y, x)
|
|
dy = diff(y) ./ (x(2) - x(1));
|
|
dy = dy([1 1:end]);
|
|
end
|