Hi all,
I've a set of amplitude-time data. I need to find the unwrapped phase of it and then plot cosine of unwrapped phase against frequency. This is the part of the code I tried. But the unwrapped phase values seems to be either 0 or pi (which is wrong i think). Can someone help me? (Amplitude data is attached for reference).
[m, n]= size(amp); % amp- amplitude data
t=linspace(0,5000,n); % time
Fs=2000000;for i=1:m L = n; NFFT = 2^nextpow2(L); UT = fft(amp(i,:),NFFT)/L; f = Fs/2*linspace(0,1,NFFT/2); ft = UT(1:NFFT/2); mag(i,:) = 2*abs(ft);end; % unwrapped phase of signal
for i=1:m g(i,:)=unwrap(angle(mag(i,:))); figure plot(f,cos(g(i,:))) end;
Best Answer