If I have the following matrix
sparse([1, 2, 3, 4, 1, 2, 4, 1, 3, 4, 5, 1, 2, 3, 4, 5, 3, 4, 5], [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5], [3, -1, -1, -1, -1, 2, -1, -1, 3, -1, -1, -1, -1, -1, 4, -1, -1, -1, 2], 5, 5)
how I can convert the matrix elements to float instead of integer? something like this:
sparse([1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 4.0, 1.,0 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0, 3.0, 4.0, 5.0], [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0, 5.0, 5.0, 5.0],[3.0, -1.0, -1.0, -1.0, -1.0, 2.0, -1.0, -1.0, 3.0, -1.0, -1.0, -1.0, -1.0, -1.0, 4.0, -1.0, -1.0, -1.0, 2.0], 5.0, 5.0)