% Creo la matrice che scriverò su DB
function DATAinsert = cellMakerPCLHR(IDcentralina,DTcatena,NodeNum,cPCLHR,ListaDate,...
    Y_PCLHR,Z_PCLHR,Ylocal_PCLHR,Zlocal_PCLHR,AlfaX_PCLHR,AlfaY_PCLHR,TempDef_PCLHR,...
    speed_PCLHR,speed_local_PCLHR,acceleration_PCLHR,acceleration_local_PCLHR,...
    ErrPreConvLinkHR,ARRAYdate_PCLHR)
            
TempDef_PCLHR = TempDef_PCLHR';
l = ListaDate;
DATAinsert = cell(l,17);

for ii=1:l
    DATAinsert{ii,1} = IDcentralina;
    DATAinsert{ii,2} = DTcatena;
    DATAinsert{ii,3} = NodeNum;
    DATAinsert{ii,4} = datestr(ARRAYdate_PCLHR(ii),'yyyy-mm-dd');
    DATAinsert{ii,5} = datestr(ARRAYdate_PCLHR(ii),'HH:MM:SS');
    DATAinsert{ii,6} = Y_PCLHR(cPCLHR,ii);
    DATAinsert{ii,7} = Z_PCLHR(cPCLHR,ii);
    DATAinsert{ii,8} = Ylocal_PCLHR(cPCLHR,ii);
    DATAinsert{ii,9} = Zlocal_PCLHR(cPCLHR,ii);
    DATAinsert{ii,10} = AlfaX_PCLHR(cPCLHR,ii);
    DATAinsert{ii,11} = AlfaY_PCLHR(cPCLHR,ii);
    DATAinsert{ii,12} = TempDef_PCLHR(cPCLHR,ii);
    DATAinsert{ii,13} = speed_PCLHR(cPCLHR,ii);
    DATAinsert{ii,14} = speed_local_PCLHR(cPCLHR,ii);
    DATAinsert{ii,15} = acceleration_PCLHR(cPCLHR,ii);
    DATAinsert{ii,16} = acceleration_local_PCLHR(cPCLHR,ii);
    DATAinsert{ii,17} = ErrPreConvLinkHR(cPCLHR,ii);
end

end
