How to fix this error?
Mostrar comentarios más antiguos
Hi, I had facing this problem. I try to compute the GUI and it comes out this error.

Respuesta aceptada
Más respuestas (2)
KSSV
el 16 de Dic. de 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 comentario
wyeen chow
el 16 de Dic. de 2020
Cris LaPierre
el 16 de Dic. de 2020
Editada: Cris LaPierre
el 16 de Dic. de 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 comentario
Image Analyst
el 16 de Dic. de 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
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!