basic code question

2 次查看(过去 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.

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by