sinc(x) and sin(pi*x)/(pi*x) produces the same graph BUT different fft?

8 ビュー (過去 30 日間)
Indra Purnama
Indra Purnama 2018 年 5 月 17 日
回答済み: Jan 2018 年 5 月 17 日
Hi guys, as the title suggest,
I made both
y= sinc(x)
and y2 = (sin(pi*x))/(pi*x)
as you can see both produce the same graph just fine.
However, it seems that I cant fft the y2, I can fft y just fine though.
Can anyone explain this to me? it seems to be matlab problem instead of math problem because the array y and y2 have the same numbers inside them
  1 件のコメント
Stephen23
Stephen23 2018 年 5 月 17 日
"as you can see both produce the same graph just fine."
I don't see that at all: what are the function values for x=0 ?

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

回答 (1 件)

Jan
Jan 2018 年 5 月 17 日
y2 contains a NaN at x==0, but y does not.
it seems that I cant fft the y2
Please be more specific. Do you get an error message of does the result differ from your expectations? Both should be an effect of having NaNs in the input.

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by