impelmentation of windowing a signal with very high overlap percentage

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

please format your code by highlighting it and pressing the {}code button
yaa I have done it now

댓글을 달려면 로그인하십시오.

 채택된 답변

raj
raj 2011년 12월 22일

0 개 추천

please suggest me if u have a complete different idea also....

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

질문:

raj
2011년 12월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by