Add matrix threshold test