How to change the default publishing configuration without running into errors?

조회 수: 4 (최근 30일)
%% ME 2004 HW 1 Template (Spring 2021)
% ME2004_S21_Homework01_AK
clear;
clc;
close all;
%% Problem 2
%% Problem 3
%% Problem 4
%% Problem 5
Genral structure of the .m file ^.
When trying to change the publishing options to pdf output file format while keeping output file folder as
C:\Users\Sasha\Desktop\ME2004_Assignments\html
get the following errors:
Error using publish
The output directory "C:\Users\Sasha\Desktop\ME2004_Assignments" 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.
Please, explain it like I am 5...

답변 (1개)

Sindhu Karri
Sindhu Karri 2021년 2월 3일
Hi,
As per my understanding, you are getting an error while using the publish() function. You need to make sure that the "C:\Users\Sasha\Desktop\ME2004_Assignments\html" folder exists and you have permission to write in it.
  댓글 수: 1
Alexander Kuznetsov
Alexander Kuznetsov 2021년 2월 4일
Hi Sindhu,
Yes, I have gotten that far from the other posts on Q&A.
I was able to somewhat solve the problem when I checked the UserWrite of my file (= 1); then check writability of every folder on the path to where I wanted to publish the file and to my surprise I was not able to publish anywhere except the ...\Sasha folder which is immediately in my Users folder. Going anywhere past this folder makes it impossible to publish the .m file. So, for now I stuck with it since publishing even in ...\Documents folder leads to the same error output message. In fact, my plots were not printing until I chose to publish in ...\Sasha folder even if I used snapnow and drawnow in the code.
My hope is to find a complete solution to this problem since even though I was able to publish in .html, my preferred method of publishing is .pdf without any errors occuring so hopefully the answer eventually comes around.
Thank you for your input!
Alex

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by