| Data Acquisition Toolbox | Search  Help Desk |
| ChannelName | Examples See Also |
ChannelName specifies a descriptive name for an analog input or analog output channel. Channel names are not required to be unique.
If a channel name is defined, then you can reference that channel by its name. If channel name is not defined, then it must be referenced by its index. You can use the makenames function to define descriptive names. This function is particularly useful when defining names for many channels.
Characteristics
| Device Objects | AI, AO |
| Class | Channel |
| Access | Read/write |
| Data Type | String |
| Modify while Running | No |
Values
The default value is an empty string.Example
Suppose you create an analog input object for a sound card and add two hardware channels.ai = analoginput('winsound')
addchannel(ai, 1:2)
You can assign a descriptive name to the first channel contained by ai.
Chan1 = ai.Channel(1)
set(Chan1, 'ChannelName', 'Joe')
You can now reference this channel by name instead of index.
set(ai.Joe,'InputRange', [-1 1]);
See Also
Functions
makenames