Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How would I add functionality to a button added to the PDE toolbox?

Asked by Brian on 6 May 2013

Hello,

I have added a button to the pdetoolbox in a edited separate m file by copying the text above for the zoom buttong and changing it a bit. How could I add functionality to this button (to export geometry and boundary condition without using the menu, and to launch my own GUI m file?

 zoomicon = str2mat('pdeicon(''zoom'');');
  zoom_btn=btngroup(pde_fig,'Iconfunctions',zoomicon,'GroupID','zoom',...
      'ButtonID','zoom','Callbacks','pdetool(''zoom'')','Groupsize',[1 1],...
      'Position',[0.44 0.96 .04 .04]);
%-ADDITION OF STRUCTURAL OPTIMIZATION BUTTON% BK  copy of "zoom" above
optimicon = str2mat('pdeicon(''structoptim'');');  % zoomicon -> structoptim
optim_btn=btngroup(pde_fig,'Iconfunctions',optimicon,'GroupID','structoptim',... % zoomicon -> optimicon
    'ButtonID','Optim','Callbacks','pdetool(''structoptim'')','Groupsize',[1 1],...
    'Position',[0.48 0.96 .04 .04]); % BK [pos start x, pos start y, length x, length y]
if btnstate(pde_fig,'structoptim',1),
    varargout = structoptim(varargin)
end

Any ideas? Thanks for your time.

0 Comments

Brian

0 Answers

Contact us