function explanation @(XTRAIN, ytrain,XTE​ST)(classi​fy(XTEST,X​TRAIN,... ytrain));

조회 수: 7 (최근 30일)
Miljan Kovacevic
Miljan Kovacevic 2016년 8월 19일
댓글: Muhammad Yasir 2022년 5월 30일
Can somebody explain me this funcion... Or give me some reference for that function. @(XTRAIN, ytrain,XTEST)(classify(XTEST,XTRAIN,... ytrain));
thanks
  댓글 수: 1
Muhammad Yasir
Muhammad Yasir 2022년 5월 30일
It's an anonymous function handle. Which represents single inline executable expressions that return one output.
To define an anonymous function, enclose input argument names in parentheses immediately after the @ operator, and then specify the executable expression.
For example, create a handle to an anonymous function that evaluates the expression x2 y2:
f = @(x,y) (x.^2 - y.^2);
Anonymous functions can accept multiple inputs but return only one output.
In your question the input argument names are : XTRAIN, ytrain,XTEST
While, the executeable expression is : classify(XTEST,XTRAIN,... ytrain)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by