MATLAB: How to include Latex equations in a report that I create using the MATLAB Report Generator

equationsgeneratorlatexMATLAB Report Generatorreport

I want to include latex equations in reports that I create using the MATLAB Report Generator along with equation numbers.
I looked in the documentation, but there is no example that shows me how that can be done.

Best Answer

The ability to embed latex Equations in a report file is not available in MATLAB Report Generator.
To workaround this limitation, you can add a latex equation to a figure using the 'text' function, turn the axis off, and then include the figure in the report.
The attached files demonstrate the workaround. The EqAdd.rpt file contains the report. The file plotEq.M is a function that is invoked by EqAdd and keeps track of the equation number.
You will need MATLAB Report Generator to execute the report files.
To generate the report, perform the following steps:
1. Download the attached files.
2. Open the EqAdd.rpt file by double-clicking on it, within MATLAB.
3. Generate the report by clicking on the 'Report' icon.
Related Question