How to set handles on multiple figures using loop?

2 ビュー (過去 30 日間)
acosep
acosep 2015 年 9 月 26 日
コメント済み: acosep 2015 年 10 月 2 日
for
set(handles.edit(from 1 to 100),'Visible','off')
end

採用された回答

Walter Roberson
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
Walter Roberson 2015 年 9 月 26 日
Aggh! Use dynamic field names not eval()
set(handles.(sprintf('edit%d', i)), 'visible', 'off')
acosep
acosep 2015 年 10 月 2 日
Why? Ok then.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by