Strct = VaryStruct(StrctIn,Var1,Var1Values,Var2,Var2Values,...)
Create an array of structures from the input structure given a vector of values to be set, or set fields in an array of input structures. Any substructures referenced in VarN must be present in the input structure, but scalar fieldnames need not be present. All variables must have the same number of values, and must be the same length as the input structure, if it is an array.
Parameters |
Description |
StrctIn [struct/array] |
Structure or array of structures |
Var1...VarN [string/cell] |
String or cell array of strings identifying fields within StrctIn to be changed |
VarNValues [array/cell array] |
Values for the specified fields in the input structure. |
Return Values |
Description |
Strct [struct array] |
Array of structures, one element per value specified |
>> P = ParamStruct;
>> P = VaryStruct(P,'Tx.TRK.BW',[10;50;100;200])
>> T = VaryStruct(T,'Loss.MyLoss',ones(size(T)))
Copyright (c) 2009. All rights reserved.
|
What do you think about this topic? Send feedback!
|