function  [motmap]=mot_input_V4(Nmot,Motor_error,Azi_range,Eye_range)

if nargin < 4
  Eye_range = 40;
end
if nargin < 3
  Azi_range = 60;
end
if nargin < 2
  Motor_error = 0;
end
if nargin < 1
  Nmot = 100;
end

global Gain_motor_error;
global mot_sigma;

Gain_motor_error=0.7;
mot_sigma=10;
Motor_error_range= Azi_range + Eye_range;

motmap=zeros(1,Nmot);
	 
	 for i=1:1:Nmot;
		Motor_error0 = -Motor_error_range + ( 2 * Motor_error_range * ( i - 1) ) / ( Nmot-1 );
	    motmap(i) = (  Gain_motor_error * exp ( -(( Motor_error0-Motor_error ) * (  Motor_error0-Motor_error ))/ ( 2 * (mot_sigma *mot_sigma) )  )     );
	 end

end
% 	/* *************** END  TEACHER *************** */