remove dynamic matrix