Promblem switch show between 2 static text in matlab GUI
1 回表示 (過去 30 日間)
古いコメントを表示
Adisorn Phanukthong
2017 年 6 月 14 日
回答済み: Walter Roberson
2017 年 6 月 14 日
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165143/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165144/image.png)
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!