Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Matlab FFT and Intel MKL

tadhgm
Beginner
513 Views
Hello,

I am new to the Intel MKL library so bare with me.
I am converting Matlab code to a C++ program and I am using the Intel MKL library for some of the math functions include the FFT.

When I use the intel dft functions and load the resultant data in matlab the data seems correct, but in a different orientation compared to the output data of equivalent fft call in matlab.

Does the Intel DFT function output the data in a special format or orientation?
I am also using the MKL_Complex16 type as input to the Intel DFT, may this be contributing to the problem?

Tadhg
0 Kudos
2 Replies
Intel_C_Intel
Employee
513 Views

Tadhg,

First of all, thanks for trying out MKL. Hopefully we can work together to get you over this hump and move you to being a more experienced MKL user.

I probably need a bit more information. From the information you have provided, I am assuming that you are working on double-precision complex data. What kinds of FFTs are you performing? 1D? 2D? Is there and issue of column versus row-oriented data? Also did you try out any of the examples that are similar to your situation?

Bruce

0 Kudos
tadhgm
Beginner
513 Views
Bruce,

First, thanks for responding, this has been a thorn in my side for a while.Yes, I am using double-complex data and it is a 2D FFT. There is no issue with the column versus row orientation, that was the first thing that looked at. It seems both the Matlab 2D FFT and the Intel 2D DFT produce the same answer but in a different orientation to each other.

If I input a sample data of a sine wave image into the Matlab FFT I get an output with the two resultant peaks at the top of the output image, with the Intel DFT I get one peak on the top left hand corner of the output image and one at the bottom right hand corner of the resultant image. The thing is that the values of the peaks are the same in both the Intel DFT and the Matlab FFT but just appear in a different places.

Tadhg




0 Kudos
Reply