function out = h(x,a) if x<0 out = 0; elseif x>a out = 1; elseif x>=0 && x<=a out = 100*x; else out = 0; end