Code covered by the BSD License  

Highlights from
fft_upsample

2.33333

2.3 | 3 ratings Rate this file 0 Downloads (last 30 days) File Size: 2.11 KB File ID: #3214

fft_upsample

by Ohad Gal

 

31 Mar 2003 (Updated 02 Apr 2003)

Upsamples a complex series to form time domain interpolation for a fixed spaced grid.

| Watch this File

File Information
Description

One cannot interpolate a complex number in the form of Real + j*imaginary.
The only way to do interpolation is on the complex representation of an amplitude + phase. But sometimes the phase is not continuous, and given in the modulo(2*pi) representation (such as the result from the "FFT" function).

Using "unwrap" function does not always manage to restore the phase to be continuous, thus interpolation in the Fourier plane is probably the only answer.

This function works on a single or 2 dimensional arrays.

Acknowledgements
This submission has inspired the following:
updownsample
MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
09 Jul 2003 karri srinivas

Respected sir,
i, srinivas, am student from university of applied sciences offenburg. i am doing master thesis on visualization of 3d electromagnetic fileds using animation. in this topic i have to interpolate two complex numbers. i did that taking real and imaginary parts seperately and also using magnitude and phase but i am not able to get interpolation correctly please do help me in calcualating interpolation using complex numbers
my email is kasp_77@yahoo.com

Thanking you sir,
srinivas

11 Mar 2004 Spam A. Lope

Straight forward approach. I was hoping for a faster method that forward and backward transforms, possibly a short term transform or approximation. I am curious if there is a good prediction routine for complex numbers to predict values outside the bounds of known samples.

28 Jan 2007 Adam Wyatt

I found the output of this function to be VASTLY incorrect (e.g. for a spiral, even when the spiral was well sampled).

"One cannot interpolate a complex number in the form of Real + j*imaginary. "
I do not believe this statement!!

One can interpolate the real and imaginary numbers instead of amp and phase. Such an approach would only fail if the data is badly sampled, in which case the results are EVEN WORSE when performing an FFT (the data is incorrectly sampled).

Try:
zi = spline(x, real(y), xi) + i*spline(x, imag(y), yi);

Remember that what you are doing is interpolating a contour on 2D data!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
approximation Ohad Gal 22 Oct 2008 06:59:06
interpolation Ohad Gal 22 Oct 2008 06:59:06
complex Ohad Gal 22 Oct 2008 06:59:06
fft Ohad Gal 22 Oct 2008 06:59:06
mathematics Ohad Gal 22 Oct 2008 06:59:06
approximations Ohad Gal 22 Oct 2008 06:59:06

Contact us at files@mathworks.com