Could anyone help me to solve the error undefined operator
1 回表示 (過去 30 日間)
古いコメントを表示
Undefined operator '==' for input arguments of type 'cell'.
Error in five (line 32)
acc = sum(YPred == YTest)./numel(YTest);
0 件のコメント
回答 (1 件)
Jonas
2021 年 6 月 20 日
編集済み: Jonas
2021 年 6 月 20 日
YPred and/or YTest are cells which can contain any kind of data, also tables, graphical objects. for that reason there is no operator for the cell. it you want to compare the content of the cell and it contains e.g. a matrix, you can use cell2mat on your variables in the formular or use suitable brackets (e.g. YPred{:} )
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!