Data Acquisition Toolbox    
ischannel

Check for channels

Syntax

Arguments

obj.Channel(index)
One or more channels contained by obj.
out
A logical value.

Description

out = ischannel(obj.Channel(index)) returns a logical 1 to out if obj.Channel(index) is a channel. Otherwise, a logical 0 is returned.

Remarks

ischannel does not determine if channels are valid (associated with hardware). To check for valid channels, use the isvalid function.

Typically, you use ischannel directly only when you are creating your own M-files.

Example

Suppose you create the function myfunc for use with the Data Acquisition Toolbox. If myfunc is passed one or more channels as an input argument, then the first thing you should do in the function is check if the argument is a channel.

You can examine the Data Acquisition Toolbox M-files for examples that use ischannel.

See Also

Functions

isvalid


  getvalue isdioline