well in simple, i wrote:
A=['handles.',get(hObject,'Tag')];
set(A,'Backgroundcolor',[0,1,0]);
or
A='handles.pushbutton1';
set(A,'Backgroundcolor',[0,1,0]);
and function 'set' cannot read that A, can you help me? Uncle MATLAB says :
Error using set
Value must be a handle

 채택된 답변

Stephen23
Stephen23 2016년 9월 25일
편집: Stephen23 2016년 9월 25일

0 개 추천

Why are you trying to construct a string? If you have a structure, then do this:
A = handles.(get(hObject,'Tag'));
And read this:

댓글 수: 1

Michal Demjan
Michal Demjan 2016년 9월 25일
Oh i didnt realized that it is struct. Thanks a lot!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2016년 9월 25일

0 개 추천

Try
handles.pushbutton1.BackgroundColor = [0, 1, 0];

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

태그

질문:

2016년 9월 25일

답변:

2016년 9월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by