15.11.2014 Views

Chapter 4: Programming in Matlab - College of the Redwoods

Chapter 4: Programming in Matlab - College of the Redwoods

Chapter 4: Programming in Matlab - College of the Redwoods

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 4.6 Nested Functions <strong>in</strong> <strong>Matlab</strong> 419<br />

hButtonGroup=uibuttongroup(...<br />

’Parent’,hPanel,...<br />

’Units’,’Pixels’,...<br />

’Position’,[10,275,180,100],...<br />

’BackgroundColor’,buttongroup_color,...<br />

’SelectionChangeFcn’,@colorSelection_callback);<br />

r1=uicontrol(...<br />

’Style’,’Radio’,...<br />

’Parent’,hButtonGroup,...<br />

’Units’,’Pixels’,...<br />

’Position’, [10,10,160,20],...<br />

’Str<strong>in</strong>g’,’Blue’,...<br />

’BackgroundColor’,buttongroup_color);<br />

r2=uicontrol(...<br />

’Style’,’Radio’,...<br />

’Parent’,hButtonGroup,...<br />

’Units’,’Pixels’,...<br />

’Position’, [10,37,160,20],...<br />

’Str<strong>in</strong>g’,’Green’,...<br />

’BackgroundColor’,buttongroup_color);<br />

r3=uicontrol(...<br />

’Style’,’Radio’,...<br />

’Parent’,hButtonGroup,...<br />

’Units’,’Pixels’,...<br />

’Position’, [10,65,160,20],...<br />

’Str<strong>in</strong>g’,’Red’,...<br />

’BackgroundColor’,buttongroup_color);<br />

hL<strong>in</strong>eStyleText=uicontrol(...<br />

’Style’,’text’,...<br />

’Parent’,hPanel,...<br />

’Position’, [10 240 180 20],...<br />

’Str<strong>in</strong>g’, ’L<strong>in</strong>eStyle Choices’,...<br />

’HorizontalAlignment’,’Left’,...<br />

’BackgroundColor’, panel_color);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!