01-05-2015 02:43 AM
How do i implement fftshift in my program.?
So basically, I have a double-sided fft, and i want this to be shifted in order to have zero frequencies, just like the matlab image below.
Solved! Go to Solution.
01-05-2015 03:05 AM
01-05-2015 08:56 AM
Yeah, what Gerd said is right.
But I think about it like this: From 0 to 250 (max frequency based on the sample time), the graph is correct. From there on, you need to subtract 500 (2*Freq(max)). Coding this should be pretty straightforward.
01-05-2015 11:22 PM
Sir GerdW,
Where can i find the split? And also whre is the reflect located?
01-05-2015 11:22 PM
Sir GerdW,
Where can i find the split? And also whre is the reflect located?
01-05-2015 11:33 PM
Think of what it would take to split an array.
You need to find out how many elements it has.
Then, you want to keep an array that is a subset of the original array with half the points.
Then, you want a copy that's reversed.
Finally, you want a concatenated array built from the two smaller arrays.
Play around in the functions palette to see if you can find anything that will handle that for you. Certainly don't hardcode a shift of 500. That works for this solution but is useless in the general sense.
01-05-2015 11:46 PM
This is my VI, and I want to implment fftshift on this one
01-05-2015 11:51 PM
Which of those steps did you try?
01-06-2015 12:05 AM
I tried using the split array
01-06-2015 01:39 AM