How to use Data Acquisition Toolbox to record voltage?

5 visualizzazioni (ultimi 30 giorni)
Hi, I wish to use the data acquisition toolbox to record a voltage input for an extended period of time (~10 min). For some reason, the data acquisition stops after 1 sec even though I use the wait function. Also when I generate 1V, Matlab only seems to record 0.28V. Why is this?
Here is my code:
ai=analoginput('winsound')
addchannel(ai,1)
start(ai)
wait(ai,600)
stop(ai)
[data,time]=getdata(ai)
plot(time,data)
I appreciate any suggestions anyone has. Thanks!

Risposte (0)

Categorie

Scopri di più su Data Acquisition Toolbox Supported Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by