11

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.

user7610
  • 25,267
  • 15
  • 124
  • 150
aman
  • 374
  • 3
  • 11

2 Answers2

5

@ prefixes the definition of an anonymous function.

David Foerster
  • 1,461
  • 1
  • 14
  • 23
1

Also, @ is used to demark a function handle.

user7610
  • 25,267
  • 15
  • 124
  • 150
  • 1
    Not in this context. -1 – David Foerster May 16 '17 at 14:09
  • There is a mismatch between the question title and the contextual example given, being the lack of parentheses in the title. This answer does, in fact, address a possible answer for the title as written. Perhaps an update to reflect this by someone would help solve the ambiguity. – Mr Purple Sep 02 '19 at 01:14