24 lines
591 B
Matlab
Executable File
24 lines
591 B
Matlab
Executable File
% Questa routine calcola le medie (giornaliere o per intervalli definiti)
|
|
% necessarie per le elaborazioni successive
|
|
|
|
function [Dati_ThL,ARRAYdateThL] = MediaDati_ThL(val_ThL,TimeThL,NdatiMedia,FileName)
|
|
|
|
text = 'MediaDati_ThL function started';
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
%% Dati Temperatura
|
|
[r,~]=size(val_ThL);
|
|
if NdatiMedia > r
|
|
NdatiMedia = r;
|
|
end
|
|
Dati_ThL = smoothdata(val_ThL,'gaussian',NdatiMedia);
|
|
|
|
ARRAYdateThL = TimeThL;
|
|
|
|
text = 'MediaDati_ThL function closed';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end |