res = isfield(S, name)
res = isfield(S, C)
| Parameter | Description |
|---|---|
| S | a struct |
| name | a string |
| C | a cell |
| Parameter | Description |
|---|---|
| res | a logical |
isfield(A) returns true if name is a fieldname of S.
S.Nelson = 1;
isfield(S, 'Nel')
isfield(S, 'Nelson')
S.nel = 1;
S.son = 2;
isfield(S,{ 1, 'nel'; 2, 'son'})
| Version | Description |
|---|---|
| 1.0.0 | initial version |