3.2. DATA OBJECTS 77
# index of the pdm the value 100.
idxlst = indexlist([4,1,2])
pdm1(idxlst) = 100
Operations on the Independent Variables/Domain
The domain of a pdm is readily changed via the pdm command. The following example
illustrates a common application; changing a frequency domain in Hertz to
radians/second.
# The following scales the domain of a pdm,
# pdm1, by a factor of 2*pi
newpdm = pdm(pdm1,2*pi*domain(pdm1))
Xmath provides a general purpose check which can be used to check whether two pdms
have the same domain. For more information on this function, refer to Section 3.3.1.
The following example illustrates this application.
# Check whether or not pdm1 & pdm2 have the
# same domains.
stat = check(pdm1,pdm2,{samedomain})
# stat = 1 if the domains are the same
3.2.3 Subblocks: selecting input & outputs
Because the Dynamic System is an Xmath data object, standard matrix referencing
can be used to select subsets of the inputs and outputs. This is illustrated in the
following.
# Select inputs 1, 3,4&5andoutputs 2 & 7 from the
# system: bigsys.
subsys = bigsys([1,3:5],[2,7])
The same format has exactly the same function for pdms.