I have recently been using fft()
to find the frequency response of my data, and compared it to fvtool
. I have found that while the magnitude looks the same, the phase looks entirely different.
I was wondering how the fvtool
creates the phase response.
For fft, I just use angle()
after fft()
and plot it vs frequency (the same X axis as magnitude response).
For fvtool
, I tried to change the number of points for FFT in analysis parameters but I the phase response is still different.
E.g. given sample signal x(t)
such as (32 samples):
0.0627905195293134
0.125333233564304
0.187381314585725
0.248689887164855
0.309016994374947
0.368124552684678
0.425779291565073
0.481753674101715
0.535826794978997
0.587785252292473
0.637423989748690
0.684547105928689
0.728968627421412
0.770513242775789
0.809016994374948
0.844327925502015
0.876306680043864
0.904827052466020
0.929776485888251
0.951056516295154
0.968583161128631
0.982287250728689
0.992114701314478
0.998026728428272
1
0.998026728428272
0.992114701314478
0.982287250728689
0.968583161128631
0.951056516295154
0.929776485888252
0.904827052466020
using:
angle = plot(samplingFrequency/2, angle(fft(x, 32)))
vs
fvtool(x)
With analysis parameter set for 32 points does not yield the same phase result. Magnitude result looks similar, though slightly different.
Thank you in advance for any help.