Technical discussion about Matlab and issues related to Digital Signal Processing.
Hi, i'm trying to analyze the phase of a signal in order to resynthesize it. I want to fill the fft buffer in a zero-phase way in order to collect the correct phase information. The problem is that the phase result is incorrect. Here there is an example of the script that i use f0=120.3; fase0=0.3; Fs=44100; durata=0.04; %sec N=round(durata*Fs/2)*2+1; t=[0:N-1]/Fs; t=t'; A=3; x=A.*cos(2*pi*f0*t+fase0); %calcolo spettro M=2^16; w = blackman(N); xw=x.*w; %riempimento buffer a fase zero xzp = [xw((N-1)/2+1:N); zeros(M-N,1); xw(1:(N-1)/2)]; %calcolo fft X = fft(xzp); %normalizzazione X=X./ (N*(sum(w)/length(w))); fase=angle(X); Anyone can help me to solve this problem?