deriv2.m¶
Basic Information¶
SYNTAX: D = deriv2(x,y,f,n)
PURPOSE: Calculate derivatives of f w.r.t. x and y
INPUTS: x, y = coordinates (need not be equidistant)
f = matrix of size(ny,nx) with values on grid x,y
n = number of adjacent points to use (default 2)
OUTPUTS: D = struct matrix with derivatives up to order n
D(i,j).f is (j-1):th x, (i-1):th y derivative