| Data Acquisition Toolbox™ | ![]() |
ChannelName specifies a descriptive name for a hardware channel. If a channel name is defined, then you can reference that channel by its name. If a channel name is not defined, then the channel must be referenced by its index. Channel names are not required to be unique.
You can also define descriptive channel names when channels are added to a device object with the addchannel function.
Usage | AI, AO, per channel |
Access | Read/write |
Data type | String |
Read-only when running | Yes |
The default value is an empty string. To reference a channel by name, it must contain only letters, numbers, and underscores and must begin with a letter.
Create the analog input object ai for a sound card and add two channels to it.
ai = analoginput('winsound');
addchannel(ai,1:2);To 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 by index.
set(ai.Joe,'Units','Decibels')
![]() | Channel | ChannelSkew | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |