フィルターのクリア

replacement for 'eval' function

5 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2018 年 6 月 14 日
編集済み: MathWorks Support Team 2024 年 5 月 8 日
I used to use 'eval' in Matlab 2017, but this triggers an error in 2018. I have looked in the documentation and user group, but found no solution. Can you help ?
Copy from command window:
Error using eval
Too many input arguments.

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 5 月 8 日
編集済み: MathWorks Support Team 2024 年 5 月 8 日
That "eval" function was a method of the "classregtree" class which was removed in MATLAB R2018a. I noticed that you are now using the "fitctree" method instead of the removed "classregtree".
The trees from "fitctree" are part of the "ClassificationTree" class. A similar method to "eval" is in that class. It is called- "predict" and it predicts labels using classification tree. The third input in "predict" is slightly different than "eval", so you would need to change the inputs slightly.
Instead of:
>> eval(T, X, s)
The "predict" function should be used with the 'Subtrees' Name-Value pair.
>> predict(T, X, 'Subtrees', s);
For more information on the "ClassificationTree" class and the "predict" function, see the documentation links below.

その他の回答 (0 件)

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by