Re: UnitStep Argument

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg658] Re: [mg628] UnitStep Argument*From*: Anthony Rebello <arebello at knox.edu>*Date*: Fri, 7 Apr 1995 16:26:22 -0500 (CDT)

If I understand your question you want template like UnitStep[x_?NonNegative] := rhs and onother template for unwanted values Unitstep[x_?Negative] := 0. However your method should work with minor syntactical adjustments UnitStep[x_] := rhs/; NonNegative[x] UnitStep[x] := 0/;Negative[x] On Sat, 1 Apr 1995, Roger M. Jones wrote: > How can I define > UnitStep[-x], so that the answer is zero > (.i.e. assign x as being a positive number). > Defining: > > x/:Positive[x]=True doesn't work. > > > Many thanks. > > --- > Regards, > > Roger > (rmj at llewelyn.slac.stanford.edu) > >