Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
Selects fields listed in a cell array from a struct. Optional third
argument suppresses error message if struct does not contain
given field.
Exmples:
struct2=selectfields(struct1,{list of field names})
Moves field names and corresponding field content from struct1 to
struct2.
struct2=selectfields(struct1,{list of field names},true)
Moves field names and corresponding field content from struct1 to
struct2 if field name exists in struct1. Error messages for
missing field nanes are suppressed
See also renamefields
See doc selectfields
Cita come
Bill Whiten (2026). selectfields: Select specified field names from a struct (https://it.mathworks.com/matlabcentral/fileexchange/63774-selectfields-select-specified-field-names-from-a-struct), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato da: renamefields: Rename some field names in a struct
Ispirato: Optional function arguments
Informazioni generali
- Versione 2.0.0.0 (4,38 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
