Skip to content

Octave

In order to use the library, you need to have Octave version 3.8.0 or higher installed.

Since Octave can interface with Java libraries, we provide this library as a self-contained version of our Java library. You can read more about using Java libraries in Octave here.

As a first step, verify that Java Interface functionality is available by entering the following command into Octave's command window:

javaclasspath

If you encounter an error after entering the command above, make sure that you have Java Runtime Environment (JRE) set up correctly following instructions in Octave's documentation. We also provide troubleshooting instructions at the bottom of this page.

Download the library's jar fileget_app. Move the jar file into a folder with your Octave project.

Open Octave and output the following command into the command window:

javaaddpath("motion-library-jar-with-dependencies.jar");

If the command fails, ensure that you have the jar file in the current directory in Octave. Alternatively, you can provide an absolute path as the javaaddpath argument.

Create a file named "example.m" (replace example with your desired file name). Continue the Getting Started guide by initializing the library in your code.

Create a file named "example.m" (replace example with your desired file name). Continue the Getting Started guide by initializing the library in your code.

Support Notes

Due to resource limitations, we don't provide a full set of code examples for Octave. Please refer to the MATLAB or Java code examples for more help.

Updating

If you are already using the library and want to update to the latest version (2.7.0), return to this page and download a new version using the link above.

Known issues

Events

The library provides functionality to subscribe to events generated by devices. This functionality is, however, disabled for Octave as its architecture does not allow spontaneous code execution from system threads.

Logging

Setting library logging to standard output results in merging the output into Octave's process standard output rather than the program's Command Window.

Troubleshooting

Please select your operating system below:

Operating system:

One common issue is to get a could not find library or dependencies error when entering javaclasspath command. This error is caused by Octave not being able to find your Java Runtime Environment (JRE) installation.

If you are using Ubuntu, make sure that Octave is not installed using the Snap store. You can do so by entering which octave command into a terminal. If the output path contains snap reinstall Octave using the package manager:

sudo snap remove octave
sudo apt install octave

Restart Octave and try javaclasspath command again.

If the command fails, ensure that you have Java Runtime Environment (JRE) installed:

java -version

If the command fails, follow the instructions in the command's output to install JRE. Then, restart Octave and try javaclasspath command again.

If the command keeps failing, you can try adjusting JAVA_HOME environment variable to point to your JRE installation. Restart Octave after every adjustment and look for the files that Octave cannot find by further adjusting JAVA_HOME.

Ensure that you have Java Runtime Environment (JRE) installed by entering the following command to a terminal:

java -version

Install JRE if the command fails. Then restart Octave and try javaclasspath command again.

If the command keeps failing, you can try adjusting JAVA_HOME environment variable to point to your JRE installation. Restart Octave after every adjustment and look for the files that Octave cannot find by further adjusting JAVA_HOME.

Ensure that you have Java Runtime Environment (JRE) installed by entering the following command to the Windows command line:

java -version

Install JRE if the command fails. Then restart Octave and try javaclasspath command again.

If the command keeps failing, you can try adjusting JAVA_HOME environment variable to point to your JRE installation. Restart Octave after every adjustment and look for the files that Octave cannot find by further adjusting JAVA_HOME.