function TSctrlsCB;

m = getfield(get(gca,'userdata'),'m');
ctrls = getfield(get(gcf,'userdata'),'controls');
objs = get(ctrls.objs ,'value');
faxis = str2num(get(ctrls.axis,'String'));
i1 = get(ctrls.i1,'value');
i2 = get(ctrls.i2,'value');
out = get(ctrls.out,'value');
opt = get(getfield(get(gcf,'userdata'),'m'),'opt');

try,
	if any((objs == 6)|(objs == 5)),
		nmap = getfield(get(gca,'userdata'),'nmap');
		[inr,outr] = regress(getfield(get(gcf,'userdata'),'m'),opt.links_history(nmap,out));
		plot(m, 'select', objs, 'axis', faxis, 'subset',[i1 i2 out],'data',[inr{1} outr{1}]);
	else
		plot(m, 'select', objs, 'axis', faxis, 'subset',[i1 i2 out]);
	end
catch,
	plot(m, 'select', objs, 'axis', faxis, 'subset',[i1 i2 out]);
end
