1

I've been issued the task of using MATLAB JavaBuilder.

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

Can I access the Object[] result as input to another process? Or the Matlab JavaBuilder is only display it in System.out.println(" "+result[0]); without do anything?

I want to access the Object[] result as:

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

which is the actual size of the output of result.

0 Answers0