isstruct
Tests if a value is a struct.
Syntax
R = isstruct(A)
Inputs
- A
- The input to be tested to determine if it is a struct.
Outputs
- R
- R is a logical value indicating whether A is a struct.
Examples
Scalar
example:
R = isstruct(1)
R = 0
Simple struct
example:
a.b = 1;
R = isstruct(a)
R = 1
Struct array
example:
a = struct('a', {1,2,3});
R = isstruct(a)
R = 1
Cell
example:
R = isstruct({1,2;3,4})
R = 0