// Plot function y defined as // y = 1 / exp( abs(x)) * regulation-factor; x <= -v2 , x >= v2 ;regulation-factor = exp( v2) // y = 1 ; -v2 < x < v2, clip range // // for use scilab // v0=10; // x-span v1=0.01; // x-step x=[(-1 * v0):v1:v0]; s0=size(x); y=zeros(1,s0(2)); for v=1:s0(2) y(v)=1 / exp( abs( x(v))); end v2=0.2; // clip range at top yv= 1 / exp( abs(v2)); yv0 = 1 / yv; for v=1:s0(2) if y(v) > yv then y(v) = 1; else y(v) = y(v) * yv0; // regulation to 1.0 as max end end clf(); // clear plot(x,y); // plot x, y