| Data Acquisition Toolbox™ | ![]() |
To send data to an analog output subsystem, it must first be queued in the data acquisition engine with the putdata function. If you want to continuously output the same data, you can use multiple calls to putdata. However, because each putdata call consumes memory, a long output sequence can quickly bring your system to halt.
As an alternative to putdata, you can continuously output previously queued data using RepeatOutput. Because RepeatOutput requeues the data, additional memory resources are not consumed. While the data is being output, you cannot add additional data to the queue.
Usage | AO, Common |
Access | Read/write |
Data type | Double |
Read-only when running | Yes |
The default value is zero.
Create the analog output object ao for a sound card and add one channel to it.
ao = analogoutput('winsound');
chans = addchannel(ao,1);To queue one second of data:
data = sin(linspace(0,10,8000))'; putdata(ao,data)
To continuously output data for 10 seconds:
set(ao,'RepeatOutput',9)
![]() | Port | Running | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |