function retval = controlfn(x)
% usage:  y = controlfn(x,P)
% description: returns control fn 

n = length(x);
