MATLAB MATLAB FFT: Zero Out DC Component for Better Frequency Analysis

  • Thread starter Thread starter OnceMore
  • Start date Start date
  • Tags Tags
    Fft Matlab
AI Thread Summary
To effectively zero out the DC component in MATLAB's FFT analysis, identify the specific element in the FFT output array that represents the DC component and set it to zero. If the DC component is distributed across several elements, all of those should be zeroed out. For scaling issues, using the 'axis' command or the magnifier tool can help visualize the desired frequency components better. This approach allows for a clearer analysis of the remaining frequency data. Implementing these strategies will enhance the frequency analysis results in MATLAB.
OnceMore
Messages
23
Reaction score
1
Hello,

I am hoping someone can give me some advice. I need to zero out the DC component of an FFT I have done, so I can get a better look at the rest of the frequency components, so how would one go about doing that?

I am not looking the code, just some advice ...I have just really started learning MATLAB for work, so any help would be great.

Thanks in advance.
Seán
 
Physics news on Phys.org
I suppose this depends on what exactly your "DC component" is.

The obvious answer, surely, is, after you have the FFT output in an array, is to identify which element of the array contains the DC component and set it equal to zero. If the "DC component" is actually spread over a small number of elements, set all of them zero.

If your problem is simply that the vertical scale of the graph is wrong for you to see the details you want, you have two other options:
  1. Interactively use the "magnifier glass" tool in the plot window to zoom into the area of interest
  2. Programmatically learn how to use the axis command
If your "DC component" actually spreads out over a very large number of elements, you have a bigger problem...
 
Hi, thanks for the reply!

I think zeroing the bin that has the frequency of the DC component is the best way to work it, I will try that.

Can't believe I didn't think of that haha.

I have used the 'axis' command for a few scaling problems, but I think setting the elements to zero will do that trick.

Thanks.
Seán
 

Similar threads

Replies
5
Views
2K
Replies
32
Views
4K
Replies
16
Views
14K
Replies
4
Views
2K
Replies
3
Views
8K
Replies
7
Views
4K
Back
Top