Skip to content

Installation

The toolkit is easy to install. The fastest and easiest way to acquire the toolkit is through mpm (Matlab Package Manager). mpm is a simple package manager for Matlab (inspired by pip) and downloads packages from Matlab Central's File Exchange, GitHub repositories, or any other url pointing to a .zip file.

Prerequisite toolboxes of MATLAB

To use Sorotoki, make sure you have the following dependencies installed:

Prerequisite software for Sorotoki (upon install of Sorotoki with MPM)

To use Sorotoki, following community packages are required:

Installation via Matlab Package Manager (MPM)

The toolkit is easy to install. The fastest and easiest way to acquire the toolkit is through mpm (Matlab Package Manager). mpm is a simple package manager for Matlab (inspired by pip) and downloads packages from Matlab Central's File Exchange, GitHub repositories, or any other url pointing to a .zip file.

Step 1: Downloading Sorotoki using MPM

Install on mpm-package: You can directly clone the repository using the MPM command:

mpm install sorotokicode --all-paths

This command will download SorotokiCode directly from the GitHub repository and create the SorotokiCode folder in the ./mpm-package folder.

Installing in specified folder

Install on desired location: Alternatively, the installation folder can be set to ~./Documents/MATLAB/. This is done by running the following line:

mpm install sorotokicode -d ~./Documents/MATLAB/ --all-paths

Error using mpm: This command is not supported when the mpm feature is not enabled.

This error is due to the fact that MATLAB has its own function called mpm, which is in conflict with the mpm tools written by mobeets. To solve the issue, we can generate a file under ~./Documents/MATLAB called startup.m. This file is called during the startup of MATLAB, and will addpath of the mobeets-mpm folder.

./Documents/MATLAB/startup.m
warning off

% change USER to your username!
USER = 'johndoe';
if ispc
    addpath(['C:\Users\',USER,'\AppData\Roaming\MathWorks\', ...
            '\MATLAB Add-Ons\Collections/mpm/mobeets-mpm-c626429']);
elseif isunix
    addpath(['/home/',USER,'/MATLAB Add-Ons/Collections/mpm/mobeets-mpm-c626429']);
end

mpm init
clc; warning on
You can check if MATLAB is using the correct path for mpm by calling
which mpm
If the correct path is still not used, call startup again in the command window.

Step 2: Running the installer

After ensuring that all the necessary prerequisites are correctly installed, the next step involves configuring the toolkit with MATLAB's search paths. This process is relatively straightforward and can be accomplished by executing the following command:

sorotoki cd                 % navigate to install folder
sorotoki install --approve  % run installer (with auto approve)
The toolkit will proceed with the installation by building search paths in Matlab. The toolkit will request the installation of the prerequisite toolboxes if they are not already installed. These include: Optimization Toolbox, Partial Differential Equation Toolbox, Image Processing Toolbox, and Matlab Coder. Especially the latter ensures that embedded Sorotoki functions can be converted to c or c++ equivalent code in the form of mex files, which greatly enhances computational performance. Finally, a verification routine is performed to check if the toolkit is installed correctly.

Step 3: Building the toolkit

Since Sorotoki uses the MATLAB Coder toolbox to speed-up computation, the toolkit still needs to be build. Here, MATLAB functions are converted to c++ executables that can be called from MATLAB as .mex files. To build these .mex files, we can simply call

sorotoki build --approve   % build sorotoki executables

Step 4: That's it folks

And that's it, Sorotoki is now ready to use. The sorotoki installation command can also be used to run demo, check updates, see version number, and find the documentation file. You can do these by running the following commands:

sorotoki demo       % list demos
sorotoki d          % ...

sorotoki version    % version (and do i need to update?)
sorotoki v          % ...

sorotoki doc        % documentation link
sorotoki i          % ...

Updating via Matlab Package Manager (MPM)

Updating Sorotoki is done via mpm.

Step 1: Pulling recent version

You can overwrite your current version of Sorotoki by calling:

mpm install sorotokicode --force --all-paths
This will pull the latest version of sorotoki git repo, and replace it with you current version.

(Optional) Step 2: Reinstallation and rebuild

Although sometimes not required, it is wise to reinstall and rebuild. Simply follow the installation steps above from Step 3.

Manual installation

Alternatively, you can download the latest version of the toolkit below, and unpack the compressed folder at any desired working directory. We do not recommend this procedure, as MPM can help maintain the Sorotoki toolkit if future updates may appear.

Sorotoki v.3.0.0.stable (code)

FAQ and installation issues

Darn', other problems during installation Please let me know by:

  1. Post an issue at: https://github.com/BJCaasenbrood/SorotokiCode/issues
  2. Get help directly at our Discord server