Finding a hidden function

when i start my .m file i get an error pointing to a function:
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GUI_2D_prestuptepla('tkon_CreateFcn',hObject,eventdata,guidata(hObject))
where "prestuptepla" should be "FlatPlate"
I am unable to find the location of this function to change it, the find function in matlab cannot locate it. How can i get to the function (which does not show anywhere) to fix the name so i won't get the error?

1 件のコメント

Adam
Adam 2017 年 8 月 29 日
Is this from a GUIDE GUI or is it just an m-file?

サインインしてコメントする。

回答 (2 件)

Jan
Jan 2017 年 8 月 29 日

0 投票

Most likely this callback is defined inside the FIG file. Open in in GUIDE and check the callbacks there.
Walter Roberson
Walter Roberson 2017 年 8 月 29 日

0 投票

This happened because you renamed the GUIDE-created GUI_2D_prestuptepla to something else.
The easiest way to fix it is to go back to the un-renamed version in GUIDE and tell GUIDE to save it under the new name.

2 件のコメント

Brian Berenbach
Brian Berenbach 2017 年 8 月 29 日
i am afraid i have made too many modifications to start again. i was hoping i could just find the location in the fig file and edit it.
Walter Roberson
Walter Roberson 2017 年 8 月 30 日
You will need to pull it into GUIDE and use the property editor to edit the tkon CreateFcn property, which will be the anonymous function
@(hObject,eventdata)GUI_2D_prestuptepla('tkon_CreateFcn',hObject,eventdata,guidata(hObject)
You will need to replace that with the equivalent referring to your proper function.
If you encountered this problem once then you are likely to encounter it again.
Or... you could add a second file (has to be a separate file)
function varargout = GUI_2D_prestuptepla(varargin)
if nargout > 0
[varargout{1:nargout}] = GUI_2D_FlatPlate(varargin{:});
else
GUI_2D_FlatPlate(varargin{:});
end
end
That would have the advantage of catching all of the problems.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDebugging and Analysis についてさらに検索

製品

質問済み:

2017 年 8 月 29 日

コメント済み:

2017 年 8 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by