Add matrix protocol with type of double