MATLAB: How to stop the PROFSAVE function in MATLAB from opening up a Web browser

MATLAB

I am collecting profiling statistics from many different places in my application and I want to use the PROFSAVE command to save these statistics. I do not want a Web browser to open as MATLAB profiles each function.

Best Answer

The ability to prevent a browser from opening every time PROFSAVE is called is not available in MATLAB.
To work around this, save the profile information that MATLAB uses to create the HTML pages to a MAT-file, and then load the saved data to create the HTML files later. This enables you to collect profile information at a low level, and delay creating the HTML files.
profInfo1=profile('info');
save profInfo1
% Later, perhaps outside the application:
load profInfo1.mat
profsave(profInfo)