Main Content

Publish and Save Printable Report of Comparison Results

You can analyze the comparison results of requirement or link set files by publishing the comparison report from the Comparison tool or from the MATLAB® command line.

Publish Report from Comparison Tool

To save a printable version of the comparison report for requirement or link set files from the tool:

  1. On the Comparison tab, click Publish and select one of these formats: Publish to HTML, Publish to Word, or Publish to PDF.

    The Save dialog box opens, where you can save a printable version of the comparison report for requirement or link set files.

  2. By default, the file name for the file types is specified as file1_file2 and location is current folder. You can change the file name and location.

By default, the report shows only the changed requirements or links. To include all requirements in the report, clear the Show Only Changed option on the Filters tab in the toolstrip.

Publish Report from Command Line

To publish and save the comparison report from the command line, use the visdiff function. You can manipulate the comparison report at the command line by specifying an output argument.

  1. Compare two requirement sets called crs_req_func_spec_01.slreqx and crs_req_func_spec_02.slreqx and return a comparison object.

    comparison = visdiff('crs_req_func_spec_01.slreqx','crs_req_func_spec_02.slreqx');

  2. Use the publish function to publish the report. By default, the function publishes the report in the HTML format and names it file1_file2.html.

    file = publish(comparison);

To save the report in a different format and by a different name, use the format and Name arguments. For example, to save the report as a PDF file named myreport, use this syntax:

file = publish(comparison,"format","PDF","Name","myreport");
Alternatively, you can specify the name-value pairs in an options structure: publish(comparison,options). For more information on the available name-value pairs for the publish function, see visdiff.

See Also