![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/199696/image.png)
Undefined function or variable 'figure1_SizeChangedFcn'.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Daniel Fonsêca
am 13 Dez. 2018
Kommentiert: Daniel Fonsêca
am 7 Jan. 2019
I tried resize my app using the Tools --> Gui Options --> Resize behavior --> Other (Use SizeChangedFCN). But, I changed my opinion and I decided to build my app without the resize. After I choose no resize my app, it started to show when my program run. Now, my program is this option Tools --> Gui Options --> Resize behavior --> Non-resizable
All error:
Undefined function or variable 'figure1_SizeChangedFcn'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in EDUFIS1 (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)EDUFIS1('figure1_SizeChangedFcn',hObject,eventdata,guidata(hObject))
Error using matlab.hg.internal.openfigLegacy (line 117)
Error while evaluating Figure SizeChangedFcn
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 24 Dez. 2018
I followed your steps and can recreate the problem. The issue is related, but there is a different way to fixing it, as you really don't want the callback function anymore. The resize callback gets added as the SizeChangedFcn in the property inspector. So even after changing the gui resize option and deleting the function from your code, there is still a handle to the resize callback function listed in the properties of the figure window.
To fix it, rt click on the figure and select "Property Inspector"
Scroll down until you see the SizeChangedFcn property. On the right you will see an anonymous function handle that looks something like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/199696/image.png)
Delete everything to the right of SizeChangedFcn.
Close the property inspector and save the Figure file.
Run your code to verify the error has gone away.
Weitere Antworten (1)
Cris LaPierre
am 18 Dez. 2018
2 Kommentare
Cris LaPierre
am 24 Dez. 2018
Bearbeitet: Cris LaPierre
am 24 Dez. 2018
There, the callback is added to the properties of the button, so deleting the button deletes all it's properties, fixing the issue (the other option is to readd the code for the callback).
Deleting the figure is not really an option, so we instead need to edit the properties.
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!