I've been running some finite element code written for MATLAB that takes up at least 40 variables and near 100 mb of memory in the workspace. This code takes anywhere from 28 to 32 minutes to run.
However, I noticed that if I don't clear the workspace with the CLEAR command and just run the new case, MATLAB runs the code in about 15 to 18 minutes! However, if I do clear the workspace with the CLEAR command and run a new case, it takes about 28 to 32 minutes to finish again!
I'm proficient in MATLAB but not an expert. Can someone enlighten me on why this happens and if there is some "trick" that I can exploit to make MATLAB run even faster?
I am using a Dell Precision T1500 with an i5 (64bit) processor with OS as Windows 7. The version of MATLAB is 7.6.0 (R2008a). Thanks
Best Answer