Why does this linear function not work while using the data acquisition toolbox
Mostra commenti meno recenti
%if the calibration switch is turned on use the slopes and
% intercepts read in above
if app.calibrate == true
while i < numel(app.indices)
i = i + 1;
data(:,i) = data(:,i)*slope(:,i)+intercepts(:,i);
end
% if the calibration switch is turned off then just display data as Voltage
elseif app.calibrate == false
data = data*1 + 0;
end
I read in the slopes and intercepts calculated in the workspace and read it in using evalin.

When the calibrate switch is in noting appears on the graph vs when it is off:

I also know that if i replace i with any whole number it will work and correspond with the correct channels slope and intercept.
data(:,1) = data(:,1)*slope(:,1)+intercepts(:,1);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!