help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding .m into javaoctave


From: astie darmayantie
Subject: Re: Adding .m into javaoctave
Date: Wed, 22 Aug 2012 16:06:43 +0700

Thank you so much for your help, i finally found the hint and solved it already!!
once again, thank youuu! Much appreciated!

2012/8/22 Martin Helm <address@hidden>
Am 22.08.2012 10:42, schrieb astie darmayantie:
> well, now the question is.. if it calls my normal installation path,
> why it could not read my function? as it's located on my image package
> directory?
>
You can simply answer the question yourself by looking at the source code
http://kenai.com/projects/javaoctave/sources/source-code-repository/content/javaoctave/src/main/java/dk/ange/octave/exec/OctaveExec.java?rev=262
it calls octave wit|h
||--no-history ||||--no-init-file ||||--no-line-editing||--no-site-file
||||--silent

|
> and i try to call my function using load like this:
>     OctaveEngine octave = new OctaveEngineFactory().getScriptEngine();
>         octave.eval("pkg load image;");
>         octave.eval("load
> /home/astie/octave/image-1.0.15/mainProg2108.m;");
>         octave.eval("i=imread('/home/astie/thesis/octave/maple.png');");
>         octave.eval("im=rgb2gray(i);");
>         octave.eval("i=i(:,:,1);");
>         octave.eval("res=mainProg2108(i);");
>         OctaveDouble res = octave.get(OctaveDouble.class, "res");
>         octave.close();
>         Double result = res.get(1);
>         System.out.println(result);
>
> and i got this error :
> Exception in thread "main"
> dk.ange.octave.exception.OctaveEvalException: load:
> /home/astie/octave/image-1.0.15/mainProg2108.m: *inconsistent number
> of columns near line 2*
>
> why is it happening? because i search on the internet, there is
> someone who experience the same problem, but they have not tell what's
> causing this problem. thank you

That I cannot tell you please ask on the javaoctave mailing list.




--
Regards,


Astie Darmayantie


reply via email to

[Prev in Thread] Current Thread [Next in Thread]