Upgrade analizza function and added carica_matrice function