MathGroup Archive 1999

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

Search the Archive

Re: Impulse Fumction using UnitStep???

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17566] Re: Impulse Fumction using UnitStep???
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 17 May 1999 02:14:23 -0400
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <7hge6f$4dd@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Define it just like you said:

   f[t_] := 0
   f[0] = 1;

This adds two rules to Mathematica's rule database:  the particular one
for f[0], and the more general one -- used whenever the particular one
does not apply, that is for all t other than 0.

Example:

	In:  Table[f[t], {t, -2, 2, 1/2}
        Out: {0,0,0,0,1,0,0,0,0}

Caution (exact integer 0 is not same as floating-point, approximate real
number 0. ):

        In:  Table[f[t], {t, 02, 2, 0.5}]
        Out: {0,0,0,0,0,0,0,0,0}

Fix:

        In:  f[0.] = 1;
        In:  Table[f[t], {t, 02, 2, 0.5}]
        Out: {0,0,0,0,1,0,0,0,0}



heiffer wrote:
> 
> hi,
> 
> i am taking a control systems course at university and i am trying to
> evaluate an impulse function [ f[t]=0 except at f[0]=1 for, say a range
> of -5 top 5 ].
> 
> i have managed to get the step and ramp functions going using the
> UnitStep function, but i could not work out the Impulse function. Any
> help would be appreciated.
> 
> regards,
> 
> heath

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.       phone 413 549-1020 (H)
Univ. of Massachusetts                     413 545-2859 (W)
Amherst, MA 01003-4515


  • Prev by Date: Re: Help! How to make the fonts in the help larger?
  • Next by Date: Re: fourier transforms
  • Previous by thread: Re: Impulse Fumction using UnitStep???
  • Next by thread: HELP: How to set RGBColor for ContourPlot?