ContentsIndexReferenceHome
PreviousUpNext
Extract
MATLAB
[DATA, Vars] = Extract(StructArray,[Var1],[Var2],...,[VarN]);
Description

Extracts specified variables from the input Structure Array and returns a single matrix with variables in each column.

Parameters
Parameters 
Description 
StructArray [struct] 
Structure Array. All sub structures must be identical 
Var1..VarN [string/cell] 
Name of variable to be extracted from StructArray. Any number of variables can be extracted. May be a cell array containing all variables to be extracted. 
Return Values
Return Values 
Description 
Data [double] 
Matrix of extracted data. Each column is data for one variable. Size of Data will be length(StructArray)xN. If variable does not exist as a field, Data will be empty ([]). 
Vars [cell] 
Cell array of variables returned in Data 
Examples

  • [Data,Vars] = Extract(M,'T.C.r0','T.C.hp','T.S_ThermBloom');
  • [Data,Vars] = Extract(M,'T(2).C.G.RP(3)');

Group
Made with Doc-O-Matic.
Copyright (c) MZA Associates 2009. All rights reserved.
What do you think about this topic? Send feedback!