% function findpip. finds prob of ipo function x = findpip(lvgrid,a,b); x = ( 1./(1+exp(-a*(lvgrid-b)))); return;