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{:} )
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!