LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do 1D FFT for every row of a 2D array?

I have one 2D array and I want to do 1D FFT for every row of that 2D array. I am now using for loop to auto index every row and do FFT. Obviously, the loop is time consuming because the array is big. Is there any VI or method to do FFT parallelly for every row?
Thanks...
0 Kudos
Message 1 of 17
(5,523 Views)
I don't think there is a way to do it faster.  The number of computations it takes to calculate the FFT is constant for each subarray.  Doing them in some other order is not going to help (I think).  To test it, you could just index every subarray out into a 1xn and have an FFT for each one.  Time them, and see how it goes.  I have a feeling you are doing it the best way.

Best,
~milq
0 Kudos
Message 2 of 17
(5,516 Views)
Milqman, thanks for your reply.....  I am considering to use c code. I hope it will be faster.
0 Kudos
Message 3 of 17
(5,507 Views)

If you have a multi processor machine or a multicore processor, you might be able to keep both CPUs busy by e.g. processing two rows in parallel. How big are the rows?

Just try some simple code variations and do some benchmarks. No guarantees. 🙂

0 Kudos
Message 4 of 17
(5,508 Views)
1000 rows.... And I don't have duo core processor.... 
0 Kudos
Message 5 of 17
(5,498 Views)
shhh . . . don't tell anybody I said this . . .

/whisper
matlab might be a better option
//whisper

You CAN keep a secret right?

😉
~milq
0 Kudos
Message 6 of 17
(5,494 Views)

%whisper

Actually, I totally agree with you..... I would like to use matlab or c...

%whisper

0 Kudos
Message 7 of 17
(5,488 Views)

i need it urgent. pls tell me how to do it.. i need fft for 50 hz frequency

Download All
0 Kudos
Message 8 of 17
(4,875 Views)

johnsasikennedy@gmil.com wrote:

i need it urgent. pls tell me how to do it.. i need fft for 50 hz frequency


(First of all, you don't have a 2D fft, so appending to this old thread is offtopic.)

 

Well, if you know "dt", you can calculate "df" to be applied to the waveform graph. No xy graph needed.

 

Besides, your question is too terse to really give an answer. Why don't you add some diagram comments to your VI explaining whats wrong with it.

 

Your X data is NOT equally spaced, so you also need to either resample at a fixed dt or use the unevenly sampled tool. Resampling is probably simpler.

0 Kudos
Message 9 of 17
(4,854 Views)

I am new to labview.

Will u pls help me out and send me the program for the 2 txt document...????

I need it urgent.

Download All
0 Kudos
Message 10 of 17
(4,815 Views)