GUI常用对话框3
1 %进度条 2 %waitbar 3 h=waitbar(0,'实例'); 4 get(h); 5 6 %获得进度条的子对象 7 get(get(h,'Children')) 8 9 ha=get(h,'Children'); 10 11 %获得坐标轴子对象内容 12 %get(ha,'Children') 13 14 %线 15 %get(ans(1)) 16 %面 17 %get(ans(2)) 18 19 hrand = waitbar(0.3, '颜色') 20 21 hal = get(hrand, 'Children'); 22 hac = get(hal, 'Children'); 23 %在所有类型中查找patch对象 24 hapa = findall(hal, 'Type', 'patch') 25 %改变颜色 26 set(hapa, 'Facecolor','k') 27 28 %调进度增加0.2 29 waitbar(0.5, hrand)