Help Center
Find gradient for query points in 3-D signed distance map
Since R2024b
grad = gradient(sdm3D,points)
grad = gradient(sdm3D,points,InterpolationMethod=interp)
grad = gradient(sdm3D,points) finds the gradient from voxels in the vicinity of the specified query points in the 3-D signed distance field.
grad
sdm3D
points
grad = gradient(sdm3D,points,InterpolationMethod=interp) specifies the method to use to interpolate the distance field.
interp
collapse all
signedDistanceMap3D
3-D signed distance map, specified as a signedDistanceMap3D object.
Example: signedDistanceMap(Resolution=2) creates a 3-D signed distance map with a grid resolution of 2 cells per meter.
signedDistanceMap(Resolution=2)
Query points, specified as an N-by-3 matrix, where each row represents an xyz-point. N is the total number of query points.
"linear"
"quadratic"
Interpolation method, specified as one of these options:
"linear" — Compute the partial derivatives of the trilinearly interpolated distance field.
"quadratic" — Compute the partial derivatives of the triquadratically interpolated distance field.
Gradient value of the voxel at each query point, returned as an N-element vector. N is the total number of query points specified in points.
By default, gradient uses the linear interpolation method to determine the gradient. Use the interp argument to change the interpolation method.
gradient
Introduced in R2024b
signedDistanceMap3D | distance
distance
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office