Adding points to a periodic contour using a trigonometric interpolant
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Matt J
2017-8-3
编辑:Matt J
2017-8-3
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 个评论
Matt J
2017-8-3
编辑:Matt J
2017-8-3
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Splines 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!