isscalar
Tests if a value is a scalar.
Syntax
R = isscalar(A)
Inputs
- A
- The input to be tested to determine if it is a scalar.
Outputs
- R
- R is a logical value indicating whether A is a scalar.
Example
Scalar example:
R = isscalar(1)
R = 1
R = isscalar([1,2;3,4])
R = 0
R = isscalar(true)
R = 1
R = isscalar('Q')
R = 1