代码拉取完成,页面将自动刷新
%% Open
% Establish the connection from MATLAB to INCA
IncaOpen;
% Connects to the currently opened experiment
IncaOpenExperiment;
%% Measure element
% Add measure element in current group
IncaAddMeasureElement('WorkbaseDevice1',[],'B_GREEN');
IncaAddMeasureElement('WorkbaseDevice1',[],'B_RED');
IncaAddMeasureElement('WorkbaseDevice1',[],'B_YELLOW');
% Start measure
data=[];
time=[];
IncaShowMessages(0);
IncaSetMeasureReadMode(0)
IncaStartMeasurement;
deltaT=0;
% Measure for 20 seconds
while(deltaT<20)
pause(0.1)
[t,d]=IncaGetRecords( 'WorkbaseDevice1','TimeC',500);
data = [data; d];
time = [time; t];
if( length(time))
% Calculate time measured
deltaT = time( length(time)) - time(1);
end
end
IncaStopMeasurement;
IncaShowMessages(1);
% Plot the results
plot(time, data);
%% Calibration element
% Add calibration element
IncaAddCalibrationElement('WorkbaseDevice1','DEMO_CONSTANT_1');
% Get calibration value
value=IncaGetCalibrationValue('WorkbaseDevice1','DEMO_CONSTANT_1');
% Set calibration value
DEMO_CONSTANT_1=10;
result=IncaSetCalibrationValue('WorkbaseDevice1','DEMO_CONSTANT_1',DEMO_CONSTANT_1);
%% Close
IncaClose;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。