필터 지우기
필터 지우기

Matlab r2017b savefig 'No file specified'

조회 수: 10 (최근 30일)
Jeno Boka
Jeno Boka 2018년 1월 11일
편집: Jeno Boka 2018년 1월 11일
I am not able to save a fig in Matlab R2017b. I tried the following dummy code:
fig = figure;
subplot(1,2,1)
imshow('saturn.png')
title('Planet');
subplot(1,2,2)
imshow('kobi.png')
title('Dog');
savefig(fig,'myfile.fig');
I get the following error:
Error using savefig (line 128)
No file name specified.
When running the same code in Matlab R2017a it succesfully saves the figure.
I am running Windows and Matlab R2017b. I did try restarting both Matlab and the PC.
Note:
I get the same error when using the saveas function.
  댓글 수: 2
Rik
Rik 2018년 1월 11일
Odd. I see no indication in the doc of R2017b why this would fail, nor is anything relevant mentioned in the release notes.
Running your example (either as a section, or as a script) I can't reproduce the error.
Jeno Boka
Jeno Boka 2018년 1월 11일
편집: Jeno Boka 2018년 1월 11일
I indeed have a function named 'savefig'. I am sorry.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 1월 11일
In R2017b, savefig only has 124 lines and does not have a message with that wording. You appear to be getting a different savefig. What shows up for
which savefig
it should show toolbox/matlab/graphics/savefig.m

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by