Help with removing the transient part in FFT
조회 수: 4 (최근 30일)
이전 댓글 표시
I want to remove the transient psrt from my fft of TE to clearly see the frequency components. I have tried removing the transient part say first 0.05 sec, but it doesn't work
My code is here: https://uk.mathworks.com/matlabcentral/answers/1937134-help-with-computing-fft?s_tid=prof_contriblnk
댓글 수: 0
답변 (1개)
Bhanu Prakash
2023년 5월 12일
Hi Siddharth,
As per my understanding, you want to remove the transient part in FFT.
To remove the transient part of FFT, you must apply a window function to the input signal before computing the FFT. Consider the code shown below:
N=128;
window_start=1;
window_stop=20;
x=rand(N,1);
x(window_start:window_stop)=x(window_start:window_stop).*hann(window_stop-window_start+1);
X=fft(x);
plot(abs(X));
where, "N" is the FFT size and "x" is a 128x1 matrix containing random values ranging in the range (0,1). To remove transient in a particular interval, "window_start" & "window_stop" are used.
The window function "hann" is applied to the values of "x" in the interval (window_start, window_stop), to remove the transient in that interval. Then the FFT is computed with the help of "fft" function.
For more information on the above-mentioned functions, you can refer to the following documentation:
For "rand" function:
For "hann" function:
For "fft" function:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!