Last updated March 10, 2010 14:25, by Kim Hansen
Feedicon  

JavaOctave

A bridge from Java to Octave, useful if you want to do some Octave calculations from inside a Java application.

The code is licensed under Apache License, Version 2.0.

Download the current javaoctave-0.6.1.jar, it was released 2010-03-10. See the changelog for changes.

JavaOctave depends only on commons-logging.

Mailing List

If you have questions send them to the General Discussion mailing list

Archive of mailing list

Frequently Asked Questions
Examples

Very simple example showing how to calculate the integral of sqrt(1-x^2) over the interval from 0 to 1. The result should be pi/4 as it is the area of a quarter of the unit circle.

 OctaveEngine octave = new OctaveEngineFactory().getScriptEngine();
 octave.put("fun", new OctaveString("sqrt(1-t**2)"));
 octave.put("t1", Octave.scalar(0));
 octave.put("t2", Octave.scalar(1));
 octave.eval("result = lsode(fun, 0, [t1 t2])(2);");
 OctaveDouble result = octave.get(OctaveDouble.class, "result");
 octave.close();
 double integral = result.get(1);
 assertEquals(Math.PI / 4, integral, 1e-5);
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close