0

I am currently call Matlab object in my java code .

The code of matlab is easy like this

function idx = clustering(W, k)
    degs = sum(W, 2);
    D = sparse(1:size(W, 1), 1:size(W, 2), degs);
    L = D-W;
    [V,dummy] = eigs(W,k,'sr');
    idx = kmeans(V, k);
end

It is easy to use the object Clustering in Java.

I generate an object with code like this,

Spclustering specClusteringcol = null;

try {
    specClusteringcol = new Spclustering();
} catch (MWException e) {
    e.printStackTrace();
}

.......do some thing

if(specClusteringcol!=null)
  specClusteringcol.dispose();

If I run simple demo in a single thread , this works correctly.

However, if I run some time cost task

the runtime will give out an exception

Undefined function 'javaaddpath' for input arguments of type 'cell'.

Why this happens? How to solve it?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.