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

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 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2016 年 8 月 19 日

コメント済み:

2022 年 5 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by