MATLAB R2013a on Ubuntu 12.10: libstdc++ issues when running 64-bit

In some systems (here, it was 64-bit Matlab on 64-bit Ubuntu 12.10) you may find an error about the version of libstdc++ being wrong. E.g. when using the system() or unix() commands.

Here’s what worked for me.

1) cd /usr/local/MATLAB/R2013a/sys/os/glnxa64
2) sudo mkdir obsolete
3) sudo mv libstdc* obsolete/
4) sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc* ./

The specific error this fixed for me was calling gnucap from Matlab. I would get the error:
gnucap: /usr/local/MATLAB/R2013a/sys/os/glnxa64/ version `GLIBCXX_3.4.15′ not found (required by gnucap)

when running in Matlab
unix('gnucap -b')
system('gnucap -b')