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

♀尐吖头ヾ 提交于 2019-12-05 18:07:31

问题


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.


回答1:


@ prefixes the definition of an anonymous function.




回答2:


Also, @ is used to demark a function handle.



来源:https://stackoverflow.com/questions/25355028/what-is-the-purpose-of-the-symbol-in-front-of-a-variable-in-octave

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!