MATLAB does not have a built-in package manager, so you'll need to use the Setup Script to download and install additional toolboxes. The shell script below downloads the CVX archive from the CVX Research website using curl ¹, extracts it using tar , and runs the MATLAB command that sets up the toolbox:

curl -s | tar zx
matlab -nodisplay -r "cd cvx; cvx_setup()"

VLFeat can be similarly installed using the following script:


curl -s$(VLFEAT_RELEASE)-bin.tar.gz | tar xz

matlab -nodisplay -r "addpath('/vlfeat-$VLFEAT_RELEASE/toolbox'); vl_setup; savepath;"

MOSEK has kindly provided a license for use on Code Ocean, and can be installed by adding bzip2 as apt-get dependency and using the following script:


curl -sL$MOSEK_RELEASE/mosektoolslinux64x86.tar.bz2 | tar xj

matlab -nodisplay -r "addpath('/mosek/8/toolbox/r2014a');"

Similarly, YALMIP can be installed together with MOSEK using the following script:


curl -sL$YALMIP_RELEASE.tar.gz | tar xz

curl -sL$MOSEK_RELEASE/mosektoolslinux64x86.tar.bz2 | tar xj

matlab -nodisplay -r \
  "addpath('/mosek/8/toolbox/r2014a'); addpath(genpath('/YALMIP-$YALMIP_RELEASE')); savepath;"

For libsvm, add the build-essential package (that includes make and gcc , among others) as an apt-get dependency so that the MEX files can be compiled. Here's a script that installs version 3.20 from GitHub:

set -ex

curl -sL | tar xz
cd libsvm-320/matlab

make all MATLABDIR=/MATLAB -j$(nproc)

matlab -nodisplay -r "addpath('$PWD'); savepath;"
  1. "cURL".
Did this answer your question?