I used to do that too back when I used MATLAB professionally (also circa a decade ago), but I found with each successive release it worked less and less reliably as use of Java spread through MATLAB's internals.
You can run it headless but with JVM, that’s pretty much the actual usable equivalent now.