0

I've build MATLAB java package using Matlab Compiler in Matlab R2016a and I want to call it to my Netbeans project. I look this tutorial and I build this code:

        MWNumericArray data1=null;
        MWNumericArray data2=null;
        Object[] result = null;
        Class1 lse = null;
        try {
            data1=new MWNumericArray(A, MWClassID.DOUBLE);
            data2=new MWNumericArray(target, MWClassID.DOUBLE);
            lse = new Class1();
            result = lse.rekursif_lse(1, data1,data2);
            //T = result;
        }catch (Exception e) {
        System.out.println("Exception! "+e.toString());}
        finally
        {
         MWArray.disposeArray(data1);
         MWArray.disposeArray(data2);
         MWArray.disposeArray(result);
         lse.dispose();
        }

where:

rekursif_lse is the file (.m) that I have been package to java (.jar) package

A is a matrix with 60x20 dimension

double A[][]=new double[60][20];

target is a matrix with 60x1 dimension

double target[][]=new double[60][1];

T is the output that I hope from rekursif_lse

double T[][]=new double[2][20];

Now, how to insert the " result " to the " T "? I've tried

T = result;

but it didn't work. Thankyou.

0 Answers0