Undefined function 'split' for input arguments of type 'char'
조회 수: 16 (최근 30일)
이전 댓글 표시
Hello everyone, When I'm using EP_ toolkit, the above problem description appears。i used matlab2013a.Does anyone know how can i solve this problem
댓글 수: 0
답변 (1개)
Stephen23
2021년 1월 21일
편집: Stephen23
2021년 1월 21일
You can probably replace that line with:
rowData = regexp(tempVar,theDelim,'split');
But given that the code was written for R2016b or later, it is quite likely that you will find other incompatibilities.
댓글 수: 4
Stephen23
2021년 1월 21일
편집: Stephen23
2021년 1월 21일
It appears that theData is a cell array and rowData is a string array, thus the allocation throws this error:
C = {1,2,3};
C{3} = "cat"; % assign to cell content is okay
C(2) = {"in"}; % assign cell to cell is okay
C(2) = "hat"; % assign string to cell -> error
I suspect that there is an input type incompatibility, e.g. the code is not written to handle strings, but you are providing strings as input data. To remove that given error, it seems that the RHS must be a cell array (presumably of character vectors).
You should check the documentation of the code that you are using, to see what input types are supported.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!