40 views (last 30 days)

There are a lot of queries on fft frequency. I guess the following point not discussed anywhere explicitly (at least at one place). Hope someone can provide an insight here.

If we have and even number of data points, N=10, the fft output arranges the data as

fft = [c0, c1, c2, c3, c4, c-5, c-4, c-3, c-2, c-1], where the numbers are subscripts corresponding to positive and negative frequencies. I read somewhere that MATLAB calculates the negative coefficient first, hence we have c-5 but not c5. The author did not explain the reason.

Point no. 1, that the c values are not symmetric.

When we wish to make two-sided frequency spectrum, the frequency axis ranges from [-(N/2): (N/2)-1]*Fs/ N. Fs is the sampling rate, N is the number of even data points.

If we wish to make a one-sided positive frequency spectrum, should we choose

A) [0:(N/2)]*Fs/N and ignore the fact the we are using the values corresponding to the negative frequency axis, given that the data is a real number and it is just a mirror image.

B) [0: (N/2)-1]*Fs/N represents the true positive frequency axis?

If Fs= 250 Hz, the true positive frequency axis will end at 124.9980 Hz

If we happen to choose the negative frequency axis values and ignore the frequency sign, the frequency axis ends at 125 Hz exactly.

The same data when plotted in Origin ends the frequency axis at 125 Hz when plotted single sidedly.

Which approach is rigorously correct? Thanks.

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 21 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722068

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722068

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722071

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722071

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722136

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722136

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722141

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722141

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722147

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722147

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722150

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722150

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722151

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722151

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722197

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722197

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722219

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722219

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722376

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722376

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722579

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722579

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722580

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722580

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722591

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722591

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722592

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722592

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722604

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722604

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722636

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722636

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722773

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722773

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722785

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722785

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722814

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722814

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722845

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722845

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722861

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/470554-correct-choice-of-one-sided-frequency-axis-after-fft#comment_722861

Sign in to comment.