Assuming that you are using windows- As the following issue is prevalent in windows
As per my knowledge, This error is caused by memory allocation in Windows and it seems to be thrown when the operating system is unable to allocate a large enough contiguous block from the heap memory.As mentioned it is likely to be this issue from Microsoft.
Microsoft have a support page about this error, including a possible fix, at the following address:
This fix involves changing a value, called IRPStackSize, in the Windows registry. More information about this registry value can be found at this website:
We also have a general troubleshooting guide to memory allocation errors in MATLAB on our MATLAB answers page. Although this is more aimed towards problems in the MATLAB environment, rather than related to a third party issue: