%% 
clc
Motor_error=0;



Gain_motor_error=0.7;
mot_sigma=10;
Motor_error_range=100;

Nmot=200;
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  TEACHER *************** */

figure(3)
x=linspace(-100,100,Nmot);
plot(x,motmap)