This project has moved. For the latest updates, please go here.

Sign(M) - No function available?

Jan 22, 2015 at 9:56 AM
Hi all,

I have a matrix M defined (for example) as

Matrix M = new DenseMatrix(3)

A whole bunch of computation happens with regards to rotation matrices and in the end my M is a full matrix.

I now need to find the sign of the matrix M, so

double signScalarValue = Sign(M)

I'm unable to find any functions that do this, and have no idea how to implement this myself, despite looking around for ages.

Could anyone help with this?

Thank you!
Coordinator
Jan 22, 2015 at 4:10 PM
What is the definition of this Sign function? I don't remember having ever used such a function and neither MATLAB nor Mathematica seem to provide it. They do have the pointwise-applied sign function of course, which just maps the scalar sign function to each value, but that returns a matrix, not a scalar.
Coordinator
Jan 22, 2015 at 4:16 PM
Edited Jan 22, 2015 at 4:18 PM
I guess you're referring to this one: http://www.siam.org/books/ot104/OT104HighamChapter5.pdf
Update: Or not, as it returns a matrix as well, not a scalar.