필터 지우기
필터 지우기

Promblem switch show between 2 static text in matlab GUI

조회 수: 1 (최근 30일)
Adisorn Phanukthong
Adisorn Phanukthong 2017년 6월 14일
답변: Walter Roberson 2017년 6월 14일
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

채택된 답변

Walter Roberson
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개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by