Why do I see errors in my pdf when using the "publish" function?

18 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2017 年 4 月 19 日
回答済み: MathWorks Support Team 2017 年 5 月 4 日
I am using the "publish" function to generate a PDF file. I have an '.m' file that contains text that I would like to publish.
This is the error I am seeing in the PDF after executing "publish":
Error using dbstatus
Error: File: <path>\test.m Line: 2 Column: 35
Unexpected MATLAB expression.
where <path> is the path to the script.

採用された回答

MathWorks Support Team
MathWorks Support Team 2017 年 4 月 19 日
The "publish" function only accepts MATLAB code, and it will run that code. Therefore, if there are errors in the ".m" file, they will also show up in your PDF. For these reasons, the publish function will also generate the above error if the text in your script is not MATLAB code.
To publish a MATLAB script without any errors, try changing the script so that it will run without error, and then publish the PDF again.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by