Error in saveas, can't save current figure
이전 댓글 표시
plot a heatmap and then tried to save the figure with saveas function on workspace,
according to the guide of matlab website "https://kr.mathworks.com/help/matlab/ref/saveas.html?lang=en"
the code is
>> saveas(gcf,'abc.png')
but, an error is occurred as follows,
Error : matlab.graphics.internal.name (line 101)* Cannot create output file '.\abc.png'*
error : print (line 71) pj = matlab.graphics.internal.name( pj );
error : saveas (line 181)
print( h, name, ['-d' dev{i}] )the contents of line101
error(message('MATLAB:print:CannotCreateOutputFile', pj.FileName));
답변 (1개)
madhan ravi
2018년 10월 21일
Try the full code:
x = [2 4 7 2 4 5 2 5 1 4];
bar(x);
saveas(gcf,'abc.png')
Remark : Create figure before saving
댓글 수: 1
madhan ravi
2018년 10월 21일
see attached .png file
카테고리
도움말 센터 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!