필터 지우기
필터 지우기

i can't save my plot as a png

조회 수: 13 (최근 30일)
Adam Jurhs
Adam Jurhs 2022년 5월 25일
댓글: Adam Jurhs 2022년 5월 25일
hi guys,
i've made a plot (errorbar plot to be precise) and i get it looking exactly as i want, but when i give MatLab the command
saveas(gcf,'ErrorPlot.png')
i get the following errors:
Error using matlab.graphics.internal.name (line 112)
Cannot create output file './ErrorPlot.png'.
Error in print (line 71)
pj = matlab.graphics.internal.name( pj );
Error in saveas (line 181)
print( h, name, ['-d' dev{i}])
can someone please help me?

채택된 답변

Walter Roberson
Walter Roberson 2022년 5월 25일
You are cd to a directory that you do not have write access to. In particular you might be cd to the matlab installation directory.
  댓글 수: 2
Adam Jurhs
Adam Jurhs 2022년 5월 25일
ahhhh, ok thanks! i'm a newbie so i'm learning these things
Adam Jurhs
Adam Jurhs 2022년 5월 25일
yep, i opend MatLab in my home directory, ran the code and it saved the plot as a png, thanks!

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by