p = loddsinv(z,b) The function is equal to 1/(1+exp(-u)) with u = z if only one input argument is given u = z*b if size(z,2) = length(b) u = z*b(1:n-1) + b(n) if size(z,2) < length(b)