basic code question

1 回表示 (過去 30 日間)
John
John 2012 年 3 月 22 日
Hello
What does the '@' symbol do in this equation?
Is the first (z) multiplied the e^(...)?
thank you
% Gaussian kernel function
kerf=@(z)exp(-z.*z/2)/sqrt(2*pi);

採用された回答

Matt Kindig
Matt Kindig 2012 年 3 月 22 日
It is a function handle. It means that you are defining an anonymous function 'kerf' that takes z as an input. The actual equation is just
exp(-z.*z/2)/sqrt(2*pi)
The User Guide has a pretty good write-up about these. Search "anonymous function" in the Help.

その他の回答 (1 件)

Wayne King
Wayne King 2012 年 3 月 22 日
That is a function handle.
  1 件のコメント
John
John 2012 年 3 月 22 日
Thank you

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

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by