Undefined function 'contains' for input arguments of type 'char'
조회 수: 33 (최근 30일)
이전 댓글 표시
Hi,
I am trying to use contains to check if string A has string B in it. Say, A = 'XYZXYZ', B = 'XY', I am using: tf = contains(A, B); But I keep getting error "Undefined function 'contains' for input arguments of type 'char'" Why?
Thanks in advance for any help. Jennifer
댓글 수: 0
채택된 답변
the cyclist
2017년 1월 23일
편집: the cyclist
2017년 1월 23일
Are you using an older version of MATLAB? According to the documentation for contains, this function was introduced in version R2016b.
추가 답변 (1개)
Geoff Hayes
2017년 1월 23일
Jennifer - which version of MATLAB are you using? According to contains, this function was introduced in R2016b.
참고 항목
카테고리
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!