32 lines
1.0 KiB
Matlab
Executable File
32 lines
1.0 KiB
Matlab
Executable File
% Questa routine calcola le medie (giornaliere o per intervalli definiti)
|
|
% necessarie per le elaborazioni successive per i Tilt Link HR
|
|
% ACCdefTLHR contiene le medie per l'intervallo definito delle accelerazioni
|
|
% ARRAYdateTLHR contiene le date e il tempo per ogni dato (per media
|
|
% giornaliera, la data di quel giorno)
|
|
|
|
function [ANGdef_IPLHR,ARRAYdateIPLHR,TempDef_IPLHR] = MediaDati_IPLHR(angIPLHR,...
|
|
TimeIPLHR,tempIPLHR,NdatiMedia,FileName)
|
|
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
text = 'MediaDati_IPLHR function started';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
%% Angoli
|
|
[r,~]=size(angIPLHR);
|
|
if NdatiMedia > r
|
|
NdatiMedia = r;
|
|
end
|
|
ANGdef_IPLHR = smoothdata(angIPLHR,'gaussian',NdatiMedia);
|
|
|
|
%% Matrice date
|
|
ARRAYdateIPLHR = TimeIPLHR;
|
|
|
|
%% Temperature
|
|
TempDef_IPLHR = tempIPLHR; % Non faccio la media, mi serve il dato come è per applicare i filtri
|
|
|
|
text = 'Average mean of In Place Link HR data executed correctly. MediaDati_IPLHR function ended';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end |