Prev: vectorizing code
Next: repeating sequence block HELP
From: Jose on 28 Jun 2010 08:10 Hello guys, I've got this uicontrol, and I would like to appear panel(k) in my buttom istead of numbers...i.e, there some form to change 'String','5' for panel(i)...in this case i=1, and 'String',6 for panel(i)...in this case i=2. Thanks in advance, a=[5 6 7] panel=find(a<7) i=0 for k=1:length(panel) i=i+1; buttom1=uicontrol('parent',hfigure{i},'String', '5',... 'Position', [240,400,60,20]); i=i+1; buttom2=uicontrol('parent',hfigure{i},'String', '6',... 'Position', [240,400,60,20]); end
From: ImageAnalyst on 28 Jun 2010 11:23 If I understand your description correctly, try this in the for loop buttonCaption = sprintf('Panel #%d', a(panel(k)); button1 = uicontrol('parent',hfigure{i},'String', buttonCaption ,... 'Position', [240,400,60,20]);
|
Pages: 1 Prev: vectorizing code Next: repeating sequence block HELP |