basic code question

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일

0 개 추천

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일

0 개 추천

That is a function handle.

카테고리

도움말 센터File Exchange에서 Programming Utilities에 대해 자세히 알아보기

태그

질문:

2012년 3월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by