MATLAB Answers

## basic code question

Asked by John

### John (view profile)

on 22 Mar 2012
Accepted Answer by Matt Kindig

### Matt Kindig (view profile)

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);
```

#### 0 Comments

Log in to comment.

## 2 Answers

### Matt Kindig (view profile)

Answer by Matt Kindig

### Matt Kindig (view profile)

on 22 Mar 2012
Accepted Answer

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.

#### 0 Comments

Log in to comment.

### Wayne King (view profile)

Answer by Wayne King

### Wayne King (view profile)

on 22 Mar 2012

That is a function handle.

John

### John (view profile)

on 22 Mar 2012

Thank you

Log in to comment.

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today