Interpolate Curve - Simple 2D or 3D Curve Interpolation

S = interpc(Q); Outputs curve S by interpolating 2D or 3D curve Q using any method available in 'interp1()'. Designed for ease of use.
25 download
Aggiornato 21 lug 2023

Visualizza la licenza

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.

Cita come

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. Recuperato .

Compatibilità della release di MATLAB
Creato con R2023a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Riconoscimenti

Ispirato da: curvspace

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0