| Data Acquisition Toolbox | Search  Help Desk |
Collecting Live Data
Perhaps the most effective way to get started with the Data Acquisition Toolbox is to collect some live data. If you have a sound card installed, you can run the following code which collects one second of data.ai = analoginput('winsound')
addchannel(ai, 1)
set(ai, 'SampleRate', 8192);
start(ai)
data = getdata(ai);
plot(data)
With just six lines of code, you can connect the Data Acquisition Toolbox to your hardware, acquire data, and plot the data. These six lines are described below.
......The Display Summary
Summary information for your data acquisition application is displayed whenever a reference to a device object or channel is not suppressed with a semicolon. You may find the display summary is a convenient way to quickly evaluate your acquisition status.