Using the MATLAB Distribution
This page provides important information for users of the Ice for MATLAB distribution.
On this page:
Overview of the Ice for MATLAB Distribution
Ice for MATLAB is available as a toolbox for supported versions of MATLAB. Each toolbox provides the following components:
- Ice library for MATLAB
- Standard Slice files
- Slice-to-MATLAB compiler (
slice2matlab
)
Installing the Ice for MATLAB Distribution
Download the toolbox file for your MATLAB version from https://zeroc.com/downloads/ice/3.7/matlab.
Now open MATLAB and navigate to the directory that contains the toolbox file. Double-click on the toolbox file to begin the installation.
Upon completion, MATLAB places the toolbox files in the Add-Ons directory specified in your Preferences settings. By default, this is a directory in your Documents folder.
You can manage the toolbox by choosing Add-Ons / Manage Add-Ons.
Using Ice for MATLAB
The installation process automatically appends the add-on directories to your MATLAB path. The installation includes a MATLAB script named slice2matlab
that you can use to easily run the Slice-to-MATLAB compiler from the MATLAB console. To verify that Ice is installed, try running the script:
>> slice2matlab -h
The Ice manual provides a complete description of the MATLAB mapping, including the options for generating MATLAB code from Slice definitions.
At a minimum, your application will need to load the Ice library by calling loadlibrary
as follows:
loadlibrary('ice', @iceproto)
Using the Sample Programs
Sample programs are provided in a separate GitHub repository. You can browse this repository to see build and usage instructions for all supported programming languages. Simply clone this repository:
git clone -b 3.7 https://github.com/zeroc-ice/ice-demos.git cd ice-demos