This project has moved and is read-only. For the latest updates, please go here.

Sign(M) - No function available?

Jan 22, 2015 at 10: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!
Jan 22, 2015 at 5: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.
Jan 22, 2015 at 5:16 PM
Edited Jan 22, 2015 at 5:18 PM
I guess you're referring to this one:
Update: Or not, as it returns a matrix as well, not a scalar.