aman
aman

Reputation: 374

what is the purpose of the @ symbol in front of a variable in octave?

For example:

model = svmTrain(X, y, C, @(x1, x2) gaussianKernel(x1, x2, sigma)); 

Disclaimer: This is from the Coursera ML class, but it's nearly impossible to search for the @ symbol conventionally.

Upvotes: 11

Views: 3567

Answers (2)

user7610
user7610

Reputation: 28811

Also, @ is used to demark a function handle.

Upvotes: 1

David Foerster
David Foerster

Reputation: 1540

@ prefixes the definition of an anonymous function.

Upvotes: 5

Related Questions