Skip to content

MATLAB

In order to use the library, you need to have MATLAB version R2017b or higher installed.

Download the library as a MATLAB Add-Onget_app. Double click on the downloaded file to install the add-on. MATLAB should open and indicate "Installation Complete" when it's finished. Alternatively, you can open the file using the Open button from the main menu in MATLAB.

Create a new project in MATLAB:

  • In the Home tab, click New > Project > Blank Project.
  • When the New Project dialog opens, enter a project name and select a folder (or create a new folder for the project), then click Create.

Create a file named "example.m" (replace example with your desired file name) by selecting Home > New Script to start writing code in MATLAB. Continue the Getting Started guide by running the example code.

Create a file named "example.m" (replace example with your desired file name) by selecting Home > New Script to start writing code in MATLAB. Continue the Getting Started guide by initializing the library in your code.

Updating

If you are already using the library and want to update to the latest version (3.1.1), return to this page and download a new version using the link above. Before installing the new version, uninstall the old version in Add-Ons > Manage Add-Ons.

Known issues

Update does not work

If the previous version of the add-on was not uninstalled, the new version may not install properly. To fix the issue navigate to Default Add-On Installation Folder (see Matlab documentation) and delete all folders whose name begin with Zaber Motion Library.

Events

The library provides functionality to subscribe to events generated by devices. This functionality is, however, disabled for MATLAB 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 MATLABs process standard output rather than programs Command Window.

File Exchange

We cannot upload the library to MATLAB Central File Exchange because of its policy that a package cannot contain binary files such as DLL.