No matter if you mess around with energy savings (“GPU auto switch”) or force your GPU to select either intern or discrete GPU mode (“gfxCardStatus” application):
this thing will not work!
Best way to use parallel computing in MATLAB though, uninstall CUDA and use MATLAB’s “parallel cpu toolbox”, or use an eGPU.
*This only holds for Apple MacBooks with an internal discrete GPU e.g. NVidia GT650M or GT750M (so models before 2016)