Sync from remote server: 2025-10-12 18:56:41

This commit is contained in:
2025-10-12 18:56:59 +02:00
commit 7e8ee264aa
553 changed files with 161447 additions and 0 deletions

37
ATD/defDatiAL.m Executable file
View File

@@ -0,0 +1,37 @@
% funzione che definisce i dati per il sensore analogico, in particolare
% tempo (TimeAL) e ADC (ADCAnalog)
function [TimeAL,ADCAnalog,ErrAnalogLink] = defDatiAL(DatiAnalogLink,ErrAnalogLink,FileName)
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'defDatiAL function started';
fprintf(fileID,fmt,text);
[r,c] = size(DatiAnalogLink);
Ncorr = 0;
% Elimino gli eventuali Not a Number
for a = 2:r
for b = 2:c
check = isnan(DatiAnalogLink(a,b));
if check == 1
DatiAnalogLink(a,b) = DatiAnalogLink(a-1,b);
ErrAnalogLink(a,b-1) = 1;
Ncorr = Ncorr+1;
end
end
end
text = ['' num2str(Ncorr) ' NaN of Analog Link corrected by defDatiAL function'];
fprintf(fileID,fmt,text);
TimeAL = DatiAnalogLink(:,1); % data
ADCAnalog = zeros(r,c-1);
b = 2; % colonna del primo analog link
ADCAnalog(:,:) = DatiAnalogLink(:,b:end); % dati ADC Analog Link
text = 'Data of Analog Link defined correctly. defDatiAL function closed';
fprintf(fileID,fmt,text);
fclose(fileID);
end