Help CenterHelp Center
Determine if input is structure array
tf = isstruct(A)
example
tf = isstruct(A) returns logical 1 (true) if A is a MATLAB® structure array and logical 0 (false) otherwise.
A
1
true
0
false
collapse all
Create a structure array.
S = struct("a",[1;2;3],"b",ones(3),"c",magic(3))
S = struct with fields: a: [3x1 double] b: [3x3 double] c: [3x3 double]
Determine if S is a structure array.
S
tf = isstruct(S)
tf = logical 1
Convert the structure array to a table.
T = struct2table(S)
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.
T
tf = isstruct(T)
tf = logical 0
Input array, specified as a scalar, vector, matrix, or multidimensional array of any data type.
backgroundPool
ThreadPool
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Introduced before R2006a
struct
istable
isfield
iscell
ischar
isobject
isnumeric
islogical
isa
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office