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

>> G = GeomStruct('Simple',[1000, 3000, 5000, 7000, 10000],50,10000); 

>> S = EngagementStruct(G); 

>> [Data,Vars] = Extract(S,'S.hp','S.L') 

  • Extract platform altitude and slant range
>> RP = Extract(S,'G.RP') 

  • Extract platform position in ECF coordinates
>> P = VaryStruct(ParamStruct,'Tx.D',(0.3:0.1:1.0), ... 

'Tx.DObs',0.1*(0.3:0.1:1.0)); 

>> Data = Extract(P,'Tx.D','Tx.DObs') 

  • Extract aperture and obscuration diameter
 

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