MATLAB: How to close the HTML file generated from Simulink Verification and Validation 3.6 (R2013b) by command

browsercvhtmlhtmlSimulink CheckSimulink Coverageweb

I am running test cases by MATLAB scripts. In my design, there are hundreds of test cases to be run. I also use CVHTML to produce HTML report from model coverage objects. But CVHTML opens a HTML report automatically in every running circle, which consumes my  machine CPU resources. I am wondering is there any command I can use to close the HTML report? For instance, the example is like:
%%%BEGIN CODE%%%
model = 'slvnvdemo_cv_small_controller'; 
open_system(model);
cvt = cvtest(model);
cvd = cvsim(cvt); 
outfile = 'ratelim_coverage.html';
cvhtml(outfile, cvd);
%%%END CODE%%%

Best Answer

You can close the web browser where the HTML report opens by grab the handle of the browser, and close the handle.
For instance, implement HTML report:
%%%BEGIN CODE%%%
model = 'slvnvdemo_cv_small_controller'; 
open_system(model);
cvt = cvtest(model);
cvd = cvsim(cvt); 
outfile = 'ratelim_coverage.html';
cvhtml(outfile, cvd);
%%%END CODE%%%
Grab the handle to the browser by implementing:
%%%BEGIN CODE%%% 
[~,h] = web;
%%%END CODE%%%
Close the browser by implementing:
%%%BEGIN CODE%%%
close(h) 
%%%END CODE%%%