This problem is related to an old library (libstdc++.so.6) shipped with Matlab. You need to force matlab to use the latest library provided by Ubuntu instead of this old one. Here are steps...
- Find the location where Matlab is installed on your machine (usually /usr/local/MATLAB/R2016a/)
- Using command line navigate to sys/os/glnxa64 within the installation folder. E.g.
- type sudo mv libstdc++.so.6 libstdc++.so.6.old to rename libstdc++.so.6
All these steps should solve the problem.