replaced element matrix datatype to float