Added MatriceToArbre function