문서도움말 센터
이 페이지의 최신 내용은 아직 번역되지 않았습니다. 최신 내용은 영문으로 볼 수 있습니다.
categorical형 배열 범주인지 테스트
tf = iscategory(A,catnames)
예제
tf = iscategory(A,catnames)는 catnames의 데이터가 A의 범주에 있을 때 논리값 1(true)을 포함하는 배열을 반환합니다. 그렇지 않으면 iscategory는 논리값 0(false)을 반환합니다.
A
catnames
1
true
iscategory
0
false
tf는 catnames와 크기가 동일합니다.
tf
모두 축소
순서형 categorical형 배열 A를 만듭니다.
A = categorical({'shirt' 'pants'; 'pants' 'hat'; 'shirt' 'pants'})
A = 3x2 categorical shirt pants pants hat shirt pants
A는 3x2 categorical형 배열입니다.
의류 품목 shirt, pants, socks, shoes가 A의 범주인지 테스트합니다.
shirt
pants
socks
shoes
catnames = {'shirt' 'pants' 'socks' 'shoes'}; tf = iscategory(A,catnames)
tf = 1x4 logical array 1 1 0 0
shirt와 pants는 A의 범주이지만, socks와 shoes는 A의 범주가 아닙니다.
iscategory는 catnames에 포함하지 않은 범주 hat에 대해서는 어떠한 정보도 제공하지 않습니다.
hat
categorical형 배열 A를 만듭니다.
A = categorical({'plane' 'car' 'train' 'car' 'plane'},... {'boat' 'car' 'plane' 'train'})
A = 1x5 categorical plane car train car plane
A는 1x5 categorical형 배열입니다.
boat가 A의 범주인지 테스트합니다.
boat
tf = iscategory(A,'boat')
tf = logical 1
A에 범주 boat의 값이 포함되어 있지 않아도 iscategory는 true를 반환합니다.
categorical형 배열로, 벡터, 행렬, 다차원 배열 중 하나로 지정됩니다.
범주 이름으로, 문자형 벡터, 문자형 벡터로 구성된 셀형 배열, string형 배열 또는 categorical형 배열로 지정됩니다.
이 함수는 tall형 배열을 완전히 지원합니다. 자세한 내용은 tall형 배열 항목을 참조하십시오.
이 함수는 코드 생성을 완전히 지원합니다. 자세한 내용은 Code Generation for Categorical Arrays (MATLAB Coder) 항목을 참조하십시오.
이 함수는 분산 배열을 완전히 지원합니다. 자세한 내용은 Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) 항목을 참조하십시오.
addcats | categorical | categories | ismember | mergecats | removecats | renamecats | reordercats | setcats | unique
addcats
categorical
categories
ismember
mergecats
removecats
renamecats
reordercats
setcats
unique
귀하의 시스템에 이 예제의 수정된 버전이 있습니다. 이 버전을 대신 여시겠습니까?
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office