FUNDAMENTALS OF SIGNALS AND SYSTEMS USING THE WEB AND MATLAB

From the web

FUNDAMENTALS OF
SIGNALS AND SYSTEMS

USING THE WEB AND MATLAB â
SECOND EDITION
EDWARD W. KAMEN AND BONNIE S. HECK

2000 By Prentice-Hall, Inc.

   Overview
   Contents
  M-files in Book
   MATLAB Tutorial
   Online Demos
   Worked Problems
    Errata

We welcome your comments and corrections to the textbook and to this Web site.

 Comments on the Book:
Contact Edward Kamen at ed.kamen@ece.gatech.edu or
Bonnie Heck at bonnie.heck@ece.gatech.edu
Electrical and Computer Engineering, Georgia Institute of Technology
 Web Site Problems and Comments:  See the information page for known problems. For comments, contact Bonnie Heck at bonnie.heck@ece.gatech.edu
 Information on Ordering the Textbook:  Contact Prentice Hall

ã 2000 Bonnie Heck . MATLAB is a registered trademark of the Mathworks, Inc.

Advertisements

Add Audio Input Channel

Syntax

  • ch = addAudioInputChannel(s,deviceName,channelID)

    example

  • [ch,idx] = addAudioInputChannel(s,deviceName,channelID)

    example

Description

example

ch = addAudioInputChannel(s,deviceName,channelID) creates and displays the object ch representing a channel added to the session s using the device represented by deviceName, with the specified channelID. The channel is stored in the variable ch.

example

[ch,idx] = addAudioInputChannel(s,deviceName,channelID) additionally creates and displays the object idx, which is an index into the array of the session object’s Channels property.

Tips

Input Arguments

collapse all

s — Session objectcharacter string

Session object created using daq.createSession specified as a string variable. Use the data acquisition session for acquisition and generation operations. Create one session per vendor and use that vendor session to perform all data acquisition operations.

deviceName — Device IDcharacter string

Device ID as defined by the device vendor specified as a character string. Obtain the device ID by calling daq.getDevices. The channel specified for this device is created for the session object.

channelID — Channel IDnumeric value

Channel ID, or the physical location of the channel on the device, added to the session, specified as numeric value. You can also add a range of channels. The index for this channel displayed in the session indicates this channels position in the session. If you add a channel with channel ID 1 as the first channel in a session, the session index is 1.

Output Arguments

collapse all

ch — Audio input channel object1xn array

Audio input channel that you add, returned as an object containing a 1xn array of vendor specific channel specific information. Use this channel object to access device and channel properties.

idx — Channel indexnumeric

Channel index returned as a numeric value. Through the index you can access the array of the session object’s Channels property.

Properties

BitsPerSample Display bits per sample
Device Channel device information
ID ID of channel in session
MeasurementType Channel measurement type
Name Specify descriptive name for the channel
Range Specify channel measurement range
StandardSampleRates Display standard rates of sampling
UseStandardSampleRate Configure session to use standard sample rates

Examples

collapse all

Add an audio input channel

s = daq.createSession('directsound')
addAudioInputChannel(s,'Audio1',1);

Add multiple audio input channels

Add two audio input channels and specify output arguments to represent the channel object and the index.

s = daq.createSession('directsound')
[ch, idx] = addAudioInputChannel(s,'Audio1',1:2);