フィルターのクリア

The relation between fft(x,8)/8 and fft(x,4)/4

2 ビュー (過去 30 日間)
zohar
zohar 2011 年 5 月 17 日
Dear all matlab users,
I wrote this code
l = 128;
t = 0:l-1;
fs = 32;
f = 32/128 * 17; % f=4.25 Hz
x = sin(2*pi*f/fs*t);
l1 = 128;
l2 = 64 ;
x1 = fft(x,l1)/l1;
x2 = fft(x,l2)/l2 ;
fres1 = fs/l1;
fres2 = fs/l2;
figure(2);
plot([0:length(x1) - 1]*fres1,abs(x1), 'b');
hold('on');
plot([0:length(x2) - 1]*fres2,abs(x2), 'r');
hold('off');
What is the relation between x1 and x2 ?
Thanks in advanced.
  1 件のコメント
Arturo Moncada-Torres
Arturo Moncada-Torres 2011 年 5 月 17 日
Much better explained ;)

サインインしてコメントする。

回答 (3 件)

Daniel Shub
Daniel Shub 2011 年 5 月 17 日
The scale factor and the number of frequency components.
  1 件のコメント
zohar
zohar 2011 年 5 月 17 日
Sorry, but i don't understand.
The length of x1 is 128 and the length of x2 is 64.
What is the scale factor and the number of frequency components ?
Can you be more specific in your answer ?
Thanks

サインインしてコメントする。


Arturo Moncada-Torres
Arturo Moncada-Torres 2011 年 5 月 17 日
OK, I suggest doing a quick plot:
figure(1);
plot(x);
figure(2);
hold('on');
plot(abs(x1), 'b');
plot(abs(x2), 'r');
hold('off');
You can see that even though it appears that x1 and x2 are different, they are actually the same. This is logical, since you are obtaining the FFT of the same signal. The only difference is that since in x1 you use 128 points and in x2 you use 64 points, the FFT of x1 has a better resolution in the frequency domain (look here for a detailed explanation).
The division between 128 and 64 is just to normalize them and make a fair comparison (try plotting without the division and you will see what I mean).
  1 件のコメント
zohar
zohar 2011 年 5 月 18 日
Arturo Moncada Torres Thanks for the info.
I understand what is frequency resolution , but I want to understand
what is the relation between x1 and x2, I think answer related to dirichlet function ;-(
I rearrange my question.

サインインしてコメントする。


Arturo Moncada-Torres
Arturo Moncada-Torres 2011 年 5 月 18 日
Maybe you mean the Dirichlet conditions? These are necessary for a function to have a Fourier Transform. Check the following links, they might be useful (specially the last one):
Regarding the relation between x1 and x2, I still support that in essence they are the same, since it is the Fourier Transform of the same signal. Maybe what you are looking is to prove that x1 and x2 both fulfill the Dirichlet conditions...?

カテゴリ

Help Center および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by