Filter löschen
Filter löschen

Error while starting a gui

1 Ansicht (letzte 30 Tage)
Sumera Yamin
Sumera Yamin am 30 Jul. 2020
Kommentiert: Walter Roberson am 2 Aug. 2020
I created a matlab gui to load some text files and process the data it contains. The GUI works all fine, but whenever i load the data, it gives me the following errors
>> guide
Undefined function or variable 'ProcessData_momentum'.
Error in
matlab.graphics.internal.figfile.FigFile / read> @ (hObject, eventdata) ProcessData_momentum ('Momentum_CreateFcn', hObject, eventdata, guidata (hObject))
Although there is no function or variable in my gui file naming "ProcessData_momentum". The gui still runs fine and does not give me anymore errors for subsequent uses, but whenever I first time open the gui, this error msg is still there. I am unable to find the source of this error. Any help is highly appreciated.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Jul. 2020
The way that particular error arose is that at one point the GUI was named ProcessData_momentum but the GUI was renamed by some means other than opening it in GUIDE and asking GUIDE to "save as".
Typically the easiest way to fix a problem such as this is to rename the .m and .fig back to ProcessData_momentum and then open it in GUIDE and tell GUIDE to save it under the new name you want.
This is not the only solution, but it is by far the easiest solution. In order to use the other solutions, you have to know your way around the property inspector to find the properties that have the problem and patch them to repair the problem.
  9 Kommentare
Sumera Yamin
Sumera Yamin am 2 Aug. 2020
I have another question related to same scripts. How can i ask my gui to ignore the rows in the uploaded text files with inf?
Walter Roberson
Walter Roberson am 2 Aug. 2020
A = YourArray;
A(~isfinite(A)) = nan;
A = rmmissing(A);
And then work with A.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by