From: Jose on
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
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]);