MATLAB Object-Oriented Programming

(Joyce) #1

OutPutName: 'outp'
OutPutRate: 75


int32 data:
3 12 12 48


Call Methods of int32


Use a MuxCard object like an array of int32 values. For example, this indexing
statement accesses the data in the object to determine the names of the input ports that
have a rate of 12 :


omx.InPutNames(omx==12)


ans =
'inp2' 'inp3'


The indexing statement generates a logical array index:


omx == 12


ans =


0 1 1 0


Indexing the MuxCard object accesses the int32 vector of input port rates:


omx(1:2)


ans =
3 12


The OutPutRate property get access method uses sum to sum the output port rates:


omx.OutPutRate


ans =
75


Representing Hardware with Classes
Free download pdf