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에서 Spline Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!