| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Verification and Validation |
| Contents | Index |
| Learn more about Simulink Verification and Validation |
cvsave(filename, model)
cvsave(filename, cvto1, cvto2, ...)
cvsave(filename, cvdo1, cvdo2, ...)
cvsave(filename, model) saves all the tests (cvtest objects) and results (cvdata objects) related to model in the text file filename.cvt. model is a handle to or name of a Simulink model.
cvsave(filename, cvto1, cvto2, ...) saves multiple cvtest objects in the text file filename.cvt. cvsave also saves information about any referenced models.
cvsave(filename, cvdo1, cvdo2, ...) saves the tests and test results for multiple cvdata objects to the text file filename.cvt. cvsave also saves information about any referenced models.
Save coverage results for the slvnvdemo_cv_small_controller model in ratelim_testdata.cvt:
model = 'slvnvdemo_cv_small_controller';
open_system(model);
cvt = cvtest(model);
cvd = cvsim(cvt);
cvsave('ratelim_testdata', model);To save cumulative coverage results:
In the Model Editor, select Tools > Coverage Settings.
On the Results tab:
Select Save cumulative results in workspace variable.
Select Save last run in workspace variable.
Click OK to close the Coverage Settings dialog box.
Simulate the model.
![]() | cvmodelview | cvsim | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |