I want to know how data acquisition toolbox works after 'start(ai)'

조회 수: 1 (최근 30일)
xiaobo wu
xiaobo wu 2014년 4월 9일
댓글: xiaobo wu 2014년 4월 9일
Usually, we write a simple data acquisition program like this:
ai=analoginput('windsound');
addchannel(ai,1);
set(ai,'SampleRate',8000);
set(ai,'SamplesPerTrigger',20000);
set(ai,'TriggerType',Inf);
start(ai)
data=getdata(ai,20000);
delete(ai)
clear ai
I am not clear what will happen after execution of start(ai);
Make a guess, after execution of start(ai), the program starts to acquire sound signal and save into the hard drive. 'data=getdata(ai,20000)' will withdraw data from hard drive file to 'data'.
So if I do not execute 'delete(ai)' and 'clear ai' right away, this program will still acquire signal into the hard drive. My guess is correct? Which file should be the saved data after execution of start.
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2014년 4월 9일
The data will not be saved to the hard drive: it will be saved into memory.
  댓글 수: 2
xiaobo wu
xiaobo wu 2014년 4월 9일
Ok,after start(ai), the data will be save into memory, will the data keep saving into memory until stop(ai)?
xiaobo wu
xiaobo wu 2014년 4월 9일
I resolved this question. Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by