Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

ischar

Determine if item is character array

Syntax

tf = ischar(A)

Description

tf = ischar(A) returns logical 1 (true) if A is a character array and logical 0 (false) otherwise.

Examples

Given the following cell array,

C{1,1} = magic(3);           % double array
C{1,2} = 'John Doe';         % char array
C{1,3} = 2 + 4i              % complex double

C = 

    [3x3 double]    'John Doe'    [2.0000+ 4.0000i]

ischar shows that only C{1,2} is a character array.

for k = 1:3
x(k) = ischar(C{1,k});
end

x

x =

     0     1     0

Introduced before R2006a

Was this topic helpful?