Adding points to a periodic contour using a trigonometric interpolant

조회 수: 1 (최근 30일)
Alex Kerzner
Alex Kerzner 2017년 8월 3일
편집: Matt J 2017년 8월 3일
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 :)

답변 (1개)

Matt J
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
Alex Kerzner
Alex Kerzner 2017년 8월 3일
Thanks for the reply, Matt. 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?
Your suggestion of adding points and then throwing some away is very clever. I might end up using that if I don't think of another way. Thanks.
Matt J
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 CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by