% Creo la matrice che scriverò su DB
function DATAinsert = cellMakerPCL(IDcentralina,DTcatena,NodeNum,cPCL,ListaDate,...
    Y_PCL,Z_PCL,Ylocal_PCL,Zlocal_PCL,AlfaX_PCL,AlfaY_PCL,TempDef_PCL,speed_PCL,...
    speed_local_PCL,acceleration_PCL,acceleration_local_PCL,ErrPreConvLink,ARRAYdate_PCL)
            
TempDef_PCL = TempDef_PCL';
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_PCL(ii),'yyyy-mm-dd');
    DATAinsert{ii,5} = datestr(ARRAYdate_PCL(ii),'HH:MM:SS');
    DATAinsert{ii,6} = Y_PCL(cPCL,ii);
    DATAinsert{ii,7} = Z_PCL(cPCL,ii);
    DATAinsert{ii,8} = Ylocal_PCL(cPCL,ii);
    DATAinsert{ii,9} = Zlocal_PCL(cPCL,ii);
    DATAinsert{ii,10} = AlfaX_PCL(cPCL,ii);
    DATAinsert{ii,11} = AlfaY_PCL(cPCL,ii);
    DATAinsert{ii,12} = TempDef_PCL(cPCL,ii);
    DATAinsert{ii,13} = speed_PCL(cPCL,ii);
    DATAinsert{ii,14} = speed_local_PCL(cPCL,ii);
    DATAinsert{ii,15} = acceleration_PCL(cPCL,ii);
    DATAinsert{ii,16} = acceleration_local_PCL(cPCL,ii);
    DATAinsert{ii,17} = ErrPreConvLink(cPCL,ii);
end

end
