This chapter is dedicated to the Matlab interface. However, most of the comments here have their Octave equivalent.
The Matlab interface of Yael is limited to functions that are not available in Matlab, i.e., the most basic matrix manipulation functions are readily available in Matlab or can be implemented trivially.
The functions currently provided are:
The functions are implemented by Mex-file, which requires to compile the Matlab interface of Yael (disabled by default). To do so, just type make in the matlab directory. You might obtain a warning about a version with the gcc version used. We never observed any trouble related to that point. In order for the functions to be found in matlab, you should include this subdirectory in the MATLAB path, for instance by setting the environment variable:
in your shell configuration files (e.g., ~/.bash_profile for bash) where YAELROOT should be set to fit your local configuration. Inside Matlab, the addpath function can be used for the same purpose.
Alternately, you can compile directly from Matlab by executing the Make.m m-file. Just ensure that you are in the correct directory before launching this command.
Conveniently, Matlab and Yael use the same convention for matrix storage (column-major).
All the functions of the Yael-Matlab interface use single precision vectors, i.e., the Matlab equivalent of float. This is in contrast to Matlab’s default double precision floating numbers. Therefore, one has to cast the input data to single precision when calling Yael functions, e.g., as:
[dis, ids] = yael_nn(single(v), single(q), 10)