How do I replace the step command for running an object in MATLAB2018a
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
In the following code;
DataRecorder = dspdemo.DAQRecorder(...
'DeviceName', deviceName,...
'SamplesPerFrame', samplesPerFrame,...
'SampleRate', sampleRate,...
'ChannelNumbers', 0,...
'OutputNumOverrunSamples', true);
%%Acquire data continuously
% Acquire data through a simple while loop, until the time reaches the
% value previously defined in endTime.
% To terminate the acquisition manually press CTRL+C
tstart = tic;
while (toc(tstart) < endTime)
% Use step method to acquire SamplesPerFrame at a time from the device
[data, numov] = step(DataRecorder);
if(~isempty(data))
plot(data), set(gca,'Xlim',[0, length(data)-1])
drawnow
end
if(numov > 0)
fprintf('Samples overrun: %g\n',numov)
end
end
In the above code the specific command;
[data, numov] = step(DataRecorder);
does not work in Matlab 2018a
How can I run that object in the same manner using Matlab2018a
I don't understand how objects work!
Thank you
1 Kommentar
Antworten (3)
Branko Celler
am 10 Jun. 2018
1 Kommentar
Walter Roberson
am 10 Jun. 2018
No. You told us that that specific command does not work in MATLAB R2018a, but you did not tell us how you know that it does not work. Does it produce an error message? Does it accept the command but nothing happens?
Branko Celler
am 10 Jun. 2018
Bearbeitet: Walter Roberson
am 10 Jun. 2018
1 Kommentar
Walter Roberson
am 10 Jun. 2018
Unfortunately that involves a toolbox that is not available for my Mac, so I cannot look at the code at the moment.
Siehe auch
Kategorien
Mehr zu Simultaneous and Synchronized Operations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!