I open MATLAB:
$ matlab &  3099
I right-click its new icon on the dock and click 'Lock to Launcher'.
The next time I try to use MATLAB, I click the new dock icon. MATLAB acts like it's succesfully opening (shows the startup graphic briefly, taskbar icon flashes like it's in-progress), but then it stops, apparently automatically terminating.
What's wrong? How do I add MATLAB to dock (so I can merely click an icon instead of opening it from Terminal)?
I suspect what's wrong is that unlike other software with a 'permanent' something (process ID?), MATLAB's something changes each time, and so 'Lock to Launcher' doesn't work to open it each time ...