Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: About UnitStep and ZeroValue

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76116] Re: About UnitStep and ZeroValue
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Wed, 16 May 2007 05:39:39 -0400 (EDT)
  • References: <f2bsqj$gon$1@smc.vnet.net>

Hi.

How about

1)

Define your function

In[7]:=
unitstepo[x_] := Piecewise[{{0, x <= 0}, {1, x > 0}}]

In[9]:=
unitstepo /@ Range[-3, 3]
Out[9]=
{0, 0, 0, 0, 1, 1, 1}

or

2)

Modify UnitStep

In[10]:=
Unprotect[UnitStep];

In[11]:=
UnitStep[0] = 0;

In[12]:=
UnitStep /@ Range[-3, 3]
Out[12]=
{0, 0, 0, 0, 1, 1, 1}

Don't forget to restore when you finish the default definition by

Clear[UnitStep];
Protect[UnitStep];

Dimitris


=CF/=C7 solidifire =DD=E3=F1=E1=F8=E5:
> In Mathematica 3.0, UnitStep is defined in package
> Calculus`DiracDelta`
> and there is an option named ZeroValue, which enables the user to
> define
> the value of UnitStep[0].
>
> http://documents.wolfram.com/v3/AddOns/Calc_DiracDelta-.html
> or
> http://tinyurl.com/35rtl7
>
> In Mathematica 5.0, UnitStep is a built-in function and the default
> value of UnitStep[0] is 1. It seems that ZeroValue is no longer
> accessible. Is there any method of changing this default value?
>
> Thank you in advance.



  • Prev by Date: Re: weird behavior when plotting multiple functions in 6.0
  • Next by Date: Graphics3D of the official "arbitrary surface"
  • Previous by thread: Re: About UnitStep and ZeroValue
  • Next by thread: Hole/Disk function