Interpolate Curve - Simple 2D or 3D Curve Interpolation

Versión 1.0.0 (3,44 KB) por John Kearns
S = interpc(Q); Outputs curve S by interpolating 2D or 3D curve Q using any method available in 'interp1()'. Designed for ease of use.
34 Descargas
Actualizado 21 jul 2023

Ver licencia

S = interpc(Q); interpolates the input curve Q, which may be 2D or 3D, to output the curve S.
interpc() expects that Q is an [(Nq)x2] or [(Nq)x3] array, where Nq = length(Q); That is, the columns of Q must represent the spatial data. This will be generalized in future versions.
S will have higher point density around the regions of Q that have high curvature.
The number of points in S can be specified with a second input argument Ns, which is an positive integer.
That is, S = interpc(Q,Ns) will produce an S such that length(S) = Ns. Ns = 100 by default.
ANY method for interpolation available to MATLAB's inbuilt 'interp1()' can be used. This is specified with third input argument. Default interpolation scheme is 'makima'.
That is, S = interpc(Q,Ns,'pchip') will generate the points of S by pchip interpolation of Q along each component of Q. Future versions will allow different interpolation schemes for x, y, & z components of Q.
interpc() isn't anything revolutionary, but it's designed to be simple and straightforward to use. Perfect for MATLAB beginners.
This function was inspired by my regular use of curvspace(), written by Yo Fukushima. You can get curvspace here.

Citar como

John Kearns (2024). Interpolate Curve - Simple 2D or 3D Curve Interpolation (https://www.mathworks.com/matlabcentral/fileexchange/132563-interpolate-curve-simple-2d-or-3d-curve-interpolation), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2023a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Agradecimientos

Inspirado por: curvspace

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0