Posts tagged ‘FAQ’

I need a certain Matlab function, where do I find it in UJMP?

UJMP supports many Matlab functions, but not all.
But you can execute Matlab from within UJMP when you use Linux:

Matlab.getInstance().setMatrix("matrixInMatlab", ujmpMatrix);
Matlab.getInstance().execute("result = matlabFunction(matrixInMatlab)");
Matrix m = Matlab.getInstance().getMatrix("result");

Unfortunately, this is not working in Windows.

You might have to tell UJMP through a parameter, where the program is installed:
-DMatlab="/opt/matlab/matlab"

Can I instanciate a Matrix without specifying its size?

It is possible to create a zero size matrix:

Matrix m = MatrixFactory.zeros(0, 0);

Sorting the rows of a matrix does not work. The values are ordered [1, 10, 11, 2, 3, 4, 5] and not as I expected.

This happens when you sort a StringMatrix with numbers in it. Use convert(ValueType.DOUBLE) to transform the matrix into a DoubleMatrix before sorting.

Can I use UJMP with Java 1.4?

No, unfortunately not. UJMP is designed for Java 6 and uses generics and other features introduced in Java 5.0. Without modifications, it will not run with lower versions.