hgexport: undefined function handle

조회 수: 14 (최근 30일)
Lian
Lian 2018년 9월 9일
답변: Akshay Khadse 2018년 9월 14일
I'd like to save an existing figure to eps using hgexport. However it keeps telling me error: undefinded function handle. The problem might be due to the incompatibility between MatLab versions. I edited the figure in 2015a, but now exporting using 2018a (both mac version though).
Is there any quick solution, say manually adding a function handle (What is it? I know what a figure handle is) to it? It is a plot with subfigures and many lines in each subfigure.
Many thanks.

답변 (1개)

Akshay Khadse
Akshay Khadse 2018년 9월 14일
I am assuming that you have a .fig file saved from MATLAB R2015a which you are trying to open and save to .eps using 'hgexport' in MATLAB R2018a. Can you post your code here to clarify this?
As per my knowledge, this is not a compatibility issue as I was able to successfully save the file as per the procedure I mentioned earlier.
Following is the snippet I used to generate a .fig file with subplots from R2015a:
myFig = figure;
subplot(2,1,1)
plot(sin(0:pi/50:2*pi));
subplot(2,1,2)
plot(cos(0:pi/50:2*pi));
savefig('myFig.fig')
Following is the snippet I used to convert the .fig file to .eps in R2018a:
myFig = openfig('myFig.fig');
hgexport(myFig,'myFig.eps')

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by