Adding points to a periodic contour using a trigonometric interpolant
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a closed curve in the complex plane, call it
Z = [z_1,z_2,...,z_n];
with all entries complex numbers.
I'd like to increase the number of points on the curve by using a trigonometric interpolant (so that I get spectral accuracy), however I only want to increase the number of points between, say, z_a and z_b (with a < b).
If I want to increase the total number of points, I can just use
Z = interpft(Z, 2*numel(Z));
Unfortunately this adds points to the whole curve, which is not what I want. Does anyone know of a way to do this? I suspect it can be done using the FFT coefficients, but I have to admit my knowledge of FFT and how to use it is rather poor, so I'm hesitant to dive in.
Any help is much appreciated. Thanks :)
0 comentarios
Respuestas (1)
Matt J
el 3 de Ag. de 2017
Editada: Matt J
el 3 de Ag. de 2017
If you're happy using interpft, then why not just use cubic spline interpolation, via the spline() command? Using interpft is the same as using a sinc interpolant and cubic splines are a close approximation of sincs.
Unfortunately this adds points to the whole curve, which is not what I want.
Alternatively, why not add points to the whole curve, then throw away the ones you don't want?
2 comentarios
Matt J
el 3 de Ag. de 2017
Editada: Matt J
el 3 de Ag. de 2017
The reason I don't want to use a cubic spline is because I'd like to represent the closed curve with spectral accuracy. Does that seem reasonable?
I don't really know what that means, but again, cubic splines should not give a very different result from interpft, and give you the flexibility of interpolating wherever you want.
Ver también
Categorías
Más información sobre Splines en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!