Page 1 of 1

How to get the variable names in a sub system?

Posted: Sat Sep 03, 2016 11:32 pm
by jp123909
hi,

I found the size of vector z in GeneralForceSubsystem was 3. I want to know
what are the three elements in the z vector. Is there any method to get the
variable names in vector z?

</Subsystem>
<Subsystem index=3 name=GeneralForceSubsystem version=0.0.1>
<DISCRETE VARS TODO>
<Vector name=q size=0>
<Vector name=u size=0>
<Vector name=z size=3>
<Vector name=uWeights size=0>
<Vector name=zWeights size=3>
</Subsystem>

thanks in advance,
Jiang

Re: How to get the variable names in a sub system?

Posted: Sun Sep 04, 2016 12:04 am
by jp123909
UPdate

I solved problem by using "getDiscreteVariable(state, DiscreteVariableIndex(0)).getTypeName()".

best regards,
Jiang