Creating a Matlab API