If your output is getting cut off when exporting as PDF, you could try exporting it as an HTML, opening the exported HTML in Chrome, click CTRL + P to open the print options, change destination to "Save as PDF" and change scale to Custom. You can then decrease the scale until your equations fit on the page.
For more options, refer this: https://www.mathworks.com/matlabcentral/answers/486782-display-gets-cut-off-when-exporting-live-script-to-pdf
