% setup_display

  clf reset, whitebg(gcf,[0 0 0])
  set(gcf,'UserData',zeros(NEUNITS,1));
  hold on
  plot(xpd,ri);
  set(gca,'Position',[.1 .2 .8 .7])
  set(gca,'ButtonDownFcn','clickhandler(xv)')
  xlabel('Mouse on the bump to make it move.')

  bias_slider = uicontrol('Style','Slider','Tag','Bias', ...
	'Position', [100 10 200 16], 'Value', 0.5, ...
	'CallBack','update_bias_slider');
  bias_text = uicontrol('Style','Text','Position',[310 10 80 16], ...
	'String','Bias');
  update_bias_slider


  inp_slider = uicontrol('Style','Slider','Tag','Inp', ...
	'Position', [100 30 200 16], 'Value', 0.5, ...
	'CallBack','update_inp_slider');
  inp_text = uicontrol('Style','Text','Position',[310 30 80 16], ...
	'String','Inp');
  update_inp_slider


  rand_slider = uicontrol('Style','Slider','Tag','Rand', ...
	'Position', [400 30 100 16], 'Value', 0.0, ...
	'CallBack','update_rand_slider');
  rand_text = uicontrol('Style','Text','Position',[410 10 80 16], ...
	'String','Rand');
  update_rand_slider


  run_button = uicontrol('Style','PushButton','Position',[10 50 40 18], ...
	'BackgroundColor',[.2 .8 .2],'String','Run', ...
	'CallBack','run_flag = Inf; salinas_mainloop');

  step_button = uicontrol('Style','PushButton','Position',[10 30 40 18], ...
	'BackgroundColor',[.5 .5 1],'String','Step', ...
	'CallBack','run_flag = 1; salinas_mainloop');

  stop_button = uicontrol('Style','PushButton','Position',[10 10 40 18], ...
	'BackgroundColor',[.8 .2 .2],'String','Stop', ...
	'CallBack','run_flag = 0;');
