function fix_wei(n)

%   Copyright 2003
%   Centre for Nonlinear Dynamics in Physiology and Medicine

global mat_vois wei_vois

%C = 400;
fig = figure('unit','norm','pos', [.4, .1, .5 , .55],...
		 'numbertitle', 'off', 'name', 'type weigths');


for i=1:length(mat_vois(:,1))

h=uicontrol('style', 'edit', 'units', 'norm',...
	    'pos', [.5-.5/n+mat_vois(i,1)/n, .5+mat_vois(i,2)/(n+1), 1/n, 1/(n + 1)],...
		'string', num2str(wei_vois(i)),'user',i);
set(h, 'call',...
             ['x=str2num(get(gco,''string''));a=get(gco,''userdata'');'...
             'eval([''wei_vois('' int2str(a) '')=x;''])']); 


end
uicontrol('style', 'push', 'units', 'norm',...
		 'pos', [0 0 1 1/(n + 1)], 'string', 'OK', 'user', [200 200],...
		'call', 'delete(gcf)');
