From: Saurabh Mahapatra on
Hi Joel,

This should work either ways regardless of whether you are reporting on MATLAB code or Simulink models.

If you have the RPT file, use the following command which can be put inside a loop where the name of the RPT file is a string that changes inside:

report('name_of_your_rpt_file', '-fpdf', '-quiet')

Example on a demo that ships with the Report Generators:

>> report('magic-square', '-fpdf','-noview', '-quiet')

For more information on additional options, see this:

>help report

Remember that the report command does two things: generates the DocBook(a standard) -based XML, and then renders this XML into a file format such as PDF etc. You could split these steps as well: generate the XMLs first and render them together. Why do like this method? If your final rendering format changes say from PDF to HTML, then you do not have to start from scratch.

Commands for exploring this REPORT and RPTCONVERT:

>help rptconvert

RPT to DocBook XML for the same example above:

>> report('magic-square', '-fdb','-noview', '-quiet')

fdb option specifies that it is DocBook XML that is to be generated.

To convert the XML to say, HTML(and not PDF), use this command:

>> rptconvert('magic-square.xml', '-fhtml','-noview', '-quiet')

Again, all these options can be parametrized inside a loop.

Hope this helps.

Thanks,

Saurabh
 | 
Pages: 1
Prev: strange problems with calllib()
Next: 3d inverse