Error When Attempting to Publish MATLAB Script

Greetings,
When I try to attempt to publish my MATLAB script I receive the following error.
Error using publish
The output file
"C:\Users\15098\Documents\MATLAB\html\AA532HW3.pdf"
is not writable.
Error in mdbpublish (line 55)
outputPath = publish(file, options);
Error using open (line 50)
NAME must be a character vector or string
scalar.
Other threads related to this problem did not have the remedy for my problem.

4 件のコメント

KSSV
KSSV 2021 年 2 月 8 日
What is variable file here? It shows error here in this variable.
Brandon
Brandon 2021 年 2 月 24 日
I'm not sure what causes this. I use the publish window to publish my scripts instead using a publish function within the script. Here is a screenshot of my publishing settings. I noticed I was originally publishing to the MATLAB folder, so I tried a different directory I created this time, but got the same error.
Cristian Miculas
Cristian Miculas 2022 年 1 月 19 日
Have you managed to solve this issue? I'm facing it now... Cannot see any clear solution online.
Richard Quist
Richard Quist 2022 年 2 月 26 日
If the specified PDF file is already opened in another application (Acrobat, Acrobat Reader, ...) then it may be "locked" preventing it from being overwritten.
If that's not the case then you might check whether you can create a file in that output location outside of MATLAB.

サインインしてコメントする。

回答 (1 件)

Aniket
Aniket 2025 年 5 月 7 日

0 投票

As mentioned by Richard, if the PDF file is already opened in another application like Acrobat, then the file is not writable, and hence can not be overwritten.
Kindly ensure that the PDF file is closed before re-publishing. If that is not possible, consider changing system default PDF viewer to a browser based viewer (Edge, Chrome, ...)

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 2 月 8 日

回答済み:

2025 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by