function getwirel(command);
% get the wire/chain length and modulus of elasticity (Pa)
global h_edit_wirel wire_length 
if nargin==0, command=0;end
if command == 0,
   wire_length=0;
   figure(4);clf
   set(gcf,'Units', 'Normalized',...
      'Position',[.05 .1 .3 .1],...
      'Name','Wire length',...
      'Color',[.8 .8 .8],...
      'tag','getwirel');
   h_text=uicontrol('Style','text',...
      'String','Enter Wire Length [m]',...
      'Units','normalized',...
      'Position',[.05 .35 .6 .4]);
   h_edit_wirel=uicontrol('Style','edit',...
      'Callback','getwirel(1);',...
      'String',num2str(wire_length),...
      'Units','Normalized',...
      'Position',[.7, .35 .25 .4]);
   h_close=uicontrol('Style','Pushbutton',...
      'String','Close',...
      'Units','normalized',...
      'Position',[.3 .02 .4 .25],...
      'Callback','close');
elseif command==1,
   wire_length=str2num(get(h_edit_wirel,'String'));
   close(4);
end
% fini
