STEP_TRANSITION A version of the Heaviside step function The Heaviside function is mimicked, but with option to set where the breakepoint between 0 and 1 takes place. This point is denoted as *xbp*, and the output exactly at *xbp* is 0.5. FORMAT h = step_transition(xbp,x) OUT h The "function" IN xbp The breakpoint between 0 and 1 x The points where h shall be calculated

0001 % STEP_TRANSITION A version of the Heaviside step function 0002 % 0003 % The Heaviside function is mimicked, but with option to set where the 0004 % breakepoint between 0 and 1 takes place. This point is denoted as 0005 % *xbp*, and the output exactly at *xbp* is 0.5. 0006 % 0007 % FORMAT h = step_transition(xbp,x) 0008 % 0009 % OUT h The "function" 0010 % IN xbp The breakpoint between 0 and 1 0011 % x The points where h shall be calculated 0012 0013 % 2014-01-15 Patrick Eriksson 0014 0015 function h = step_transition(xbp,x) 0016 0017 h = repmat( 0.5, size(x) ); 0018 0019 h(find(x<xbp)) = 0; 0020 h(find(x>xbp)) = 1; 0021 0022

Generated on Mon 15-Sep-2014 13:31:28 by