impelmentation of windowing a signal with very high overlap percentage
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to manually implement stft,but i wanted to implement in such a way that the overlap of window is so large i mean to say if the window length is from 1 to 98 samples my overlap should be from 2nd sample to 99 samples i have created a code with using the basic functions not even considering the fft function of matlab also my algorithm was to calculate the fft of the windowed signal manually and later slide the window by deleting the 1st sample and then adding the 99th sample in my case. this is the code i have designed so far please help me from here as i have no idea from here.
fs = 5000;
t = (0:100)/fs;
omega1 = 2*pi*500;
w = hamming(98)';%window with length of 98
x = sin(omega1*t);%signal
e = length(x);
y = x(1:98).*w;% windowed signal
T = length(y);
N = length(y);
freq = (0:N-1)*fs/N;%frequency axis
output = zeros(size(x));
for k = 0:N-1
s = 0;
for n = 0 : N-1
s = s + x(n + 1).*w(n+1) .*exp(-2i * pi * n * k / N);%fft performed with windowing
Stotal = s - x(n+1)*exp(-2i * pi * n * 0 / N);%I have subtracted the 1st sample
end
output(k+1 ) = Stotal;
end
댓글 수: 2
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!