| MATLAB® | ![]() |
TF = isscalar(A)
TF = isscalar(A) returns logical 1 (true) if A is a 1-by-1 matrix, and logical 0 (false) otherwise.
The A argument can be a structure or cell array. It also be a MATLAB object, as described in Object-Oriented Programming, as long as that object overloads the size function.
Test matrix A and one element of the matrix:
A = rand(5);
isscalar(A)
ans =
0
isscalar(A(3,2))
ans =
1isvector, isempty, isnumeric, islogical, ischar, isa, is*
![]() | isreal | issorted | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |