How to set handles on multiple figures using loop?
조회 수: 19 (최근 30일)
이전 댓글 표시
for
set(handles.edit(from 1 to 100),'Visible','off')
end
댓글 수: 0
채택된 답변
Walter Roberson
2015년 9월 26일
set(handles.edit(1:100),'Visible','off')
Question: is handles.edit vector of length 100, or do you have handles.edit1, handles.edit2, handles.edit3, and so on up to 100? If you do, then are those handles the only uicontrol of style edit or are there a small number of others or are there a bunch of others?
댓글 수: 5
Walter Roberson
2015년 9월 26일
Aggh! Use dynamic field names not eval()
set(handles.(sprintf('edit%d', i)), 'visible', 'off')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!