isstruct - Determine if input is structure array - MATLAB (original) (raw)
Main Content
Determine if input is structure array
Syntax
Description
tf = isstruct([A](#mw%5F05c84778-32c5-425a-a0af-fabeb2775279))
returns logical1
(true
) if A
is a MATLAB® structure array and logical 0
(false
) otherwise.
Examples
Create a structure array.
S = struct("a",[1;2;3],"b",ones(3),"c",magic(3))
S = struct with fields: a: [3×1 double] b: [3×3 double] c: [3×3 double]
Determine if S
is a structure array.
Convert the structure array to a table.
T=3×3 table
a b c
_ ___________ ___________
1 1 1 1 8 1 6
2 1 1 1 3 5 7
3 1 1 1 4 9 2
Verify that T
is not a structure array.
Input Arguments
Input array, specified as a scalar, vector, matrix, or multidimensional array of any data type.
Extended Capabilities
Version History
Introduced before R2006a