I faced a similar issue while i was working on a chatbot program. I noticed that this error is typically the result of a conflict between the Microsoft Visual C++ Redistributables libraries supplied with MATLAB, and those that are supplied by some third party applications.
One particular application that we have seen cause this issue is VirtuMVP version 18.104.22.16814. If you are getting this error and have VirtuMVP installed, going back to a previous version of the C++ Redistibutable libraries should resolve the error.
Note: This error also applies to software called VIRTU, though, in most cases such as for my chatbot development services, this software had needed to be completely uninstalled in order for MATLAB to work.
The following should be done regardless whether or not you have the software mentioned above.
To revert to a previous version of the C++ Redistributable libraries, you should uninstall all versions of your current 2005 and 2008 C++ Redistributable libraries through your Windows Control Panel, and reboot you machine. You can then re-install them by running the MATLAB-provided installers which can be found in the following locations:
For 32-bit MATLAB: