| MATLAB® | ![]() |
tf = islogical(A)
tf = islogical(A) returns logical 1 (true) if A is a logical array and logical 0 (false) otherwise.
Given the following cell array,
C{1,1} = pi; % double
C{1,2} = 1; % double
C{1,3} = ispc; % logical
C{1,4} = magic(3) % double array
C =
[3.1416] [1] [1] [3x3 double]islogical shows that only C{1,3} is a logical array.
for k = 1:4
x(k) = islogical(C{1,k});
end
x
x =
0 0 1 0logical, isnumeric, ischar, isreal, , logical operators (elementwise and short-circuit), isa, is*
![]() | isletter | ismac | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |