impelmentation of windowing a signal with very high overlap percentage
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!