On 7 January 2011 17:49, Mark H Weaver <mhw at netris.org> wrote:
[...]
> There are four common variants of the unit step function. ?All agree
> that step(x)=0 for x<0 and step(x)=1 for x>0. ?The four common values
> for step(0) are: 0, 1, 1/2, or unspecified.
>
> For Maxima's built-in unit_step(x) function, unit_step(0)=0.
>
> By the above definition of the unilateral Z-transform, the rule above is
> incorrect. ?The rule would be correct for a different variant of step
> function, where step(0)=1.
>
>>> However, given that unit_step(0)=0, this is the correct rule:
>>>
>>> ?defrule (r913_2b,
>>> ? ? ?z_transform (unit_step (nn%), nn%, zz%),
>>> ? ? ?1/(zz - 1));
>
> I guess that when working with sequences, it is more convenient to work
> with a step function for which step(0)=1. ?In other cases, step(0)=1/2
> or step(0)=0 may be more convenient. ?That is why I am thinking about
> how best to add support for other variants of the unit step function to
> Maxima.
>
> I will write more on that soon.
Speaking purely as a non-computer scientist, it would seem more
correct to me to have separate discrete- and continuous-variable
"step" functions already to begin with. One is a sequence and has a z
transform, the other isn't and does not.
Thanks,
Pouya