How to fix this error?
Ältere Kommentare anzeigen
Hi, I had facing this problem. I try to compute the GUI and it comes out this error.

Akzeptierte Antwort
Weitere Antworten (2)
KSSV
am 16 Dez. 2020
If you want to open .fig file.
openfig('DSBSCfig.fig')
If you want to run the .m file, open it and press F5 or press the run button. Or you be in the directory where the DBSCfig.m file is present and type
DBSCfig
1 Kommentar
wyeen chow
am 16 Dez. 2020
Cris LaPierre
am 16 Dez. 2020
Bearbeitet: Cris LaPierre
am 16 Dez. 2020
In checking your gui, the issue is you have given both the label and the edit field the same tag (fm for example). So when you run the command get(handles.fm,'String'), you get the string property of both objects.
K>> get(handles.fm,'String')
ans =
2×1 cell array
{'"0"' }
{'Frequency Modulate(fc)'}
I suggest updating your tags so that no two objects use the same tag.
1 Kommentar
Image Analyst
am 16 Dez. 2020
For robustness, you might assume that if it's a cell array, to get the first (or last) entry:
editFieldContents = handles.fm.String;
if iscell(editFieldContents)
% Extract first string.
editFieldContents = editFieldContents{1}; % or editFieldContents{end}; depending on what you want.
% Put that one string back into the edit field.
handles.fm.String = handles.fm.String;
end
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!