What will this function return

Hello, I understand the handle of function @f, my question is about the fft and ifft part.
c0 = fftshift(1i*(-n/2:1:n/2-1)');
D1 = @(f) real(ifft(c0.*fft(f)));
What will D1 return?
Thanks

回答 (1 件)

the cyclist
the cyclist 2017 年 3 月 20 日

0 投票

It is an example of an anonymous function.

2 件のコメント

Wei Wang
Wei Wang 2017 年 3 月 20 日
Thanks for your answer. I understant @(f) and my question is about "real(ifft(c0.*fft(f)))" part. I'm wondering what will D1 return.
Guillaume
Guillaume 2017 年 3 月 20 日
I'm not sure what you want us to tell you other than a handle to an anonymous function that calculates the real part of the inverse fft of c0 multiplied by the fft of f.
As anonymous functions go, this is not a very well constructed function though, since it multiplies a fixed length vector with a variable length input. Unless f is a row vector of length n the function will error.

この質問は閉じられています。

タグ

質問済み:

2017 年 3 月 20 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by