Promblem switch show between 2 static text in matlab GUI
1 次查看(过去 30 天)
显示 更早的评论
but N and A show Do not display the value sent, but it will display the last value.
if cellfun(@(x)x == 'A',status)
disp('No')
%
% handles.texta
%
set(handles.texta,'String','A');
set(handles.texta,'visible','on');
set(handles.textn,'visible','off');
else if cellfun(@(x)x == 'N',status)
disp('YES')
set(handles.textn,'String','N');
set(handles.textn,'visible','on');
set(handles.texta,'visible','off');
end
end
0 个评论
采纳的回答
Walter Roberson
2017-6-14
I suspect that your code
if cellfun(@(x)x == 'A',status)
should be more like
if strcmp(status{1}, 'A')
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!