How to zero the region of the FFT output?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I zero the rigion of the FFT output before plotting? The zero frequency region will be at the left hand side of the output plot:![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/538651/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/538651/image.png)
I would like to zero the high value peaks at the extreme ends of th eplot and replot to bring up the signals in between.
How would I zero this region?
This is parts of the code of the algorithm:
t = sym(1):1:sym(P); % Signal duration/length
fncT = (T.^t) - floor(T.^t/M)*M; % Alternative version to mod(a,b)
% Fast fourier Transforms 1-D
A = fftshift(double(fncT)); % Rearranges 'fncT' by shifting the zero-frequency component to the centre of the array
A = fft(A); % Computes duscrete fourier transform of A using fft algorithm
A_mag = abs(A.*A);
0 commentaires
Réponses (1)
Star Strider
le 4 Mar 2021
If you want to set the 0 frequency d-c (constant offset) component of the fft result to 0, subtract the mean of the signal from the signal before calculating the fft:
FTsignal = fft(signal - mean(signal))/numel(signal);
This removes the d-c offset and normalises by the length of the signal.
0 commentaires
Voir également
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!