matlab fft and fftw

Started by Marc2050 in comp.dsp10 years ago 8 replies

Hi. I did a simple test (1d fft) of some data with fftw and matlab. The results seem to differ. I wonder what am I missing? I need to port my...

Hi. I did a simple test (1d fft) of some data with fftw and matlab. The results seem to differ. I wonder what am I missing? I need to port my codes from matlab to a custom program. Many thanks for any help. fftw: fftw_complex *in, *out; fftw_plan p; int N = 16; in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); out = (fftw_complex*) fftw_malloc(sizeof(fft...


FFTW question about larger output array than input

Started by nobby_trussin in comp.dsp15 years ago 10 replies

Hi, I am using FFTW to obtain freq values from an input signal. The input and output arrays are the same size. However, I need more precision...

Hi, I am using FFTW to obtain freq values from an input signal. The input and output arrays are the same size. However, I need more precision (i need to detect frequencies which aren't whole numbers) therefore as i understand it i need a larger output array than my input one. i am using FFTW 3's real-to-real fftw_plan_r2r_1d function as follows: fftw_plan_r2r_1d (numSamples, in, out, FFTW_...


FFTW plans

Started by katz in comp.dsp16 years ago 1 reply

hello i'm really sorry for what will seem to most people in this forum as a trivial question, but i am having trouble using the FFTW...

hello i'm really sorry for what will seem to most people in this forum as a trivial question, but i am having trouble using the FFTW library. everything compiles correctly, but for some reason when i run the program it crashes. i worked out that the problem comes from when i read the data into the input array, but i really don't know what i am doing wrong. here is the code. i know that this for...


Zero padding fftw

Started by simwes in comp.dsp10 years ago 80 replies

Hello everybody I am writing a code to transform an array from the frequency domain to time domain using the fftw. In order to increase the...

Hello everybody I am writing a code to transform an array from the frequency domain to time domain using the fftw. In order to increase the resolution of the signal in the time domain I am adding zero in the frequency before sending it to the fftw. The problem is that the signal in the time domain shifts as I add zero in the array in the frequency domain! I don't understand why! Please can s...


FFTW on DSP

Started by bngguy in comp.dsp16 years ago 4 replies

Hello All, I'm planning to use FFTW library on the DSP....has anybody used it with code composer studio to generate the coff file...

Hello All, I'm planning to use FFTW library on the DSP....has anybody used it with code composer studio to generate the coff file for the DSP ??..please share your experiences Thanks bngguy


FFTW 3.1.2 - fftw_plan_many_dft

Started by solonas13 in comp.dsp13 years ago 4 replies

Hello guys, I wanted to ask something concerning FFTW 3.1.2 I want to compute a 2D Fourier Transform of a 64x64 array. For research reasons I...

Hello guys, I wanted to ask something concerning FFTW 3.1.2 I want to compute a 2D Fourier Transform of a 64x64 array. For research reasons I need to calculate firstly 64 transforms, thus the rows, and then in order to transpose between the two dimensions I NEED to use the strided calls to check their performance. This is what I do: FOR the x dimension ------------------- fftw_plan_many...


r2c/c2r FFTW advanced interface question/example

Started by mpbro in comp.dsp13 years ago

I'd like to use FFTW's "advanced" interface to compute the Fourier transform of the "fast" and "slow" axis of a 2D array individually. The input...

I'd like to use FFTW's "advanced" interface to compute the Fourier transform of the "fast" and "slow" axis of a 2D array individually. The input data are real. An in-place transform is required. I will attach a simple Fortran 90 test program which illustrates a problem that I'm having. The program initializes a FFTW "padded" real array to a constant value of 1.0. It runs the r2c/c2r FF...


Imaginary values non-null in FFTW Java wrapper real transform

Started by SeanOg in comp.dsp15 years ago 1 reply

Hi all, I was hoping someone could shed some light on this problem Im having. Ill be as clear as possible. Im using the Java JNI wrapper for...

Hi all, I was hoping someone could shed some light on this problem Im having. Ill be as clear as possible. Im using the Java JNI wrapper for FFTW. The problem I am having is regarding the imaginary components being returned from a real to complex tranform. As I understand it, the format of the array returned by the FFTW real to complex transform is (for an even N length signal); [dc][r...


new to FFTW - I have some questions

Started by jawilson in comp.dsp15 years ago 7 replies

Hello, I am new to using the FFTW algorithms in C++, and need some help getting started. I have used matlab (and done a good deal of C++)...

Hello, I am new to using the FFTW algorithms in C++, and need some help getting started. I have used matlab (and done a good deal of C++) for many years, and I am rewriting some of my matlab code in C++ to see if it helps with speed/memory issues. I'll give an overview of what I'm trying to do, and see if anyone has suggestions. So, I am reading in a MAT file, and the data I want is stor...


FFTW Sample Project

Started by ilTallman in comp.dsp16 years ago 2 replies

Does anybody have a sample project using FFTW? Read the documentation, but there's a lot to be misunderstood. Thanks! Mike This...

Does anybody have a sample project using FFTW? Read the documentation, but there's a lot to be misunderstood. Thanks! Mike This message was sent using the Comp.DSP web interface on www.DSPRelated.com


Questions about fftw

Started by Anonymous in comp.dsp15 years ago 3 replies

Hi, I am using the FFTW library to do some image processing. I am using the r2c plan to get the fourier transform. The documentation clearly...

Hi, I am using the FFTW library to do some image processing. I am using the r2c plan to get the fourier transform. The documentation clearly states that the size of the output for a m*n input is m*(n/2+1). Also, the dc component of the result is the (0,0) element, rather than at the centre of the array. So what i need to know is, 1) How is the rest of the fourier transform oriented? 2) Wh...


Fast 2d convolution using FFTW

Started by pegels in comp.dsp15 years ago 3 replies

Hi Community! I've got a problem that has been driving me mad for several days: I need a quick 2d convolution of a picture and a big (say...

Hi Community! I've got a problem that has been driving me mad for several days: I need a quick 2d convolution of a picture and a big (say 70x70) kernel. I was thinking of doing it in frequency domain using FFTW (the programme is in C++). This is the way I am doing it: 1. Pad the filter to the size of the input image. (padding "all around", so the "important" part is in the middle) 2....


fftw_plan_dft_1d F90

Started by bastide in comp.dsp15 years ago 6 replies

Hi everybody, I have a Fortran90 program where I have to use FFTW librairies. fftw is written in C but wrappers exist for Fortran. Thus...

Hi everybody, I have a Fortran90 program where I have to use FFTW librairies. fftw is written in C but wrappers exist for Fortran. Thus ffwt_plan_dft_1d can be applied as in C with slight differences (no ffwt_malloc, no fftw_free, and no pointer). I have an array of 0 everywhere except within the central part (=1), real data that I put into the real components of the complex input "in". ...


Re: fftw and derivative. once again

Started by Jerry Avins in comp.dsp10 years ago 3 replies

On Sunday, January 9, 2011 8:11:59 AM UTC-5, ntiy wrote: > Hi DSP guys. > > I know there were a few threads with this question already. I...

On Sunday, January 9, 2011 8:11:59 AM UTC-5, ntiy wrote: > Hi DSP guys. > > I know there were a few threads with this question already. I looked > through them and I am still stuck. Can't figure out what could be wrong and > my eyes and head hurt. So, I thought may be someone helps... > > I am trying to compute derivative with fftw. Here are key points of my C > code (well, tha


fftw and derivative. once again

Started by ntiy in comp.dsp10 years ago 6 replies

Hi DSP guys. I know there were a few threads with this question already. I looked through them and I am still stuck. Can't figure out what...

Hi DSP guys. I know there were a few threads with this question already. I looked through them and I am still stuck. Can't figure out what could be wrong and my eyes and head hurt. So, I thought may be someone helps... I am trying to compute derivative with fftw. Here are key points of my C code (well, that's actually the whole code): main() { ... ... N = 128; a0 = 1; alpha...


fftw- problems with imaginary using split format

Started by jawilson in comp.dsp15 years ago 1 reply

Hello, I am working on getting fftw working, and I feel like I'm almost there, but have run into a new problem. I am performing a dft in...

Hello, I am working on getting fftw working, and I feel like I'm almost there, but have run into a new problem. I am performing a dft in several loops using the guru interface, where the input array is 4D, and the FFT is taken on the last dimension. This seemed to be mostly working earlier this week, but is now giving me problems; I'm not sure what I might have changed to cause this. I ...


Convolution of two one-dimensional arrays

Started by katz in comp.dsp16 years ago 1 reply

hello everyone, i just downloaded the FFTW library, and i read the tutorial (well..i skimmed through it). i'm using dev-C++. in c++, i...

hello everyone, i just downloaded the FFTW library, and i read the tutorial (well..i skimmed through it). i'm using dev-C++. in c++, i constructed 2 vectors, and i have to convolve them using the FFTW library. the stuff in the tutorial seems much more complex than what i want to do, and i am a newbie. a really slow learning newbie that needs guidence. so, i was wondering if anyone could pleas...


FFTW convolution scaling problem

Started by schoopy in comp.dsp9 years ago 7 replies

Hello everyone, I need help on this one. I am trying to use FFTW to compute the integral of x^-4 and some smooth on/off signal first in 1D....

Hello everyone, I need help on this one. I am trying to use FFTW to compute the integral of x^-4 and some smooth on/off signal first in 1D. But already here I am experiencing some scaling problem by a factor close to 3. This is what I do (after reading bunch of web pages) for a N sampling: 1. compute N points of the functions between -L and L. 2. wrap around the response function (x^-4) in ...


wrong frequency with FFTW

Started by rvhoven in comp.dsp16 years ago 5 replies

I'm new to FFTW and I'm trying to get it to recongize a tone. When I run the fft on a single tone it will recongize the tone but a the wrong...

I'm new to FFTW and I'm trying to get it to recongize a tone. When I run the fft on a single tone it will recongize the tone but a the wrong frequency. When I run it with 2 tones it will recongize 2 tones but again at the wrong frequency and the spacing between the tones are incorrect. What could I be doing wrong? I have posted some of the code that I use to compute the fftw. Thanks in adva...


2D Convolution using FFTW

Started by Swati in comp.dsp16 years ago 1 reply

Hello everyone, I am implementing a fast convolution program using FFTW library. I understand the constraints of the Discrete Convolution...

Hello everyone, I am implementing a fast convolution program using FFTW library. I understand the constraints of the Discrete Convolution Theorem, and the issues of wrap around error and periodicity. Hence, I am taking the following approach at the moment. /*-------------------*/ Image: image[sizeX][sizeY] (Symmetrical)Filter: kernel[2k + 1][2k + 1] Step(1) Define padX = siz...