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!