When MATLAB or any other application is idle for a significant period of time, the operating system will swap the application from physical memory to virtual memory. This is done in order to free up physical memory that may be needed by another application.
When the user then tries to access an application that has been idle for a long period of time and now lies in virtual memory, the operating system needs to retrieve data from virtual memory, which can take a very long time (at least 1000 times slower than retrieving data from physical memory or RAM). If you wait for the operating system to perform the swap from virtual memory to physical memory, you should not need to quit MATLAB in order to use it again.
If the user is doing intensive computation iteratively, he might consider writing the output of each iteration to a file using fopen, fprintf, fclose. The user may also save the intermediate variables at each iteration to a MAT file, so that if the MATLAB session is unresponsive, he can bring up another session of MATLAB and load those variables to examine them.
Depending on the program/application, the user may also try running MATLAB with the -nojvm or -nodesktop option. This will make it easier for the OS to load MATLAB back into the physical memory
Best Answer