MathGroup Archive 2001

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

Search the Archive

Re: Square wave form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29301] Re: Square wave form
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 12 Jun 2001 04:18:20 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9g20it$6qf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

squareWave[x_?NumericQ] := 
  With[{y = Mod[x, 2] - 1}, 2*(-UnitStep[y] + UnitStep[y + 1]) - 1]

Plot[sqWave[x, 1], {x, -8, 8}, PlotRange -> All]

??

Regards
  Jens



daldosch wrote:
> 
> To whom it may concerne:
> 
> How would I go about plotting a sqare
> wave form ,or  one of rectangular shape
> ?
> I did find the sawline function (
> math.book 2.9.2 ) , but I don`t know how
> to get mathematica to plot a square ,
> rectangular ,or trapezoid like graph.
> 
> sincerely yours ,
> 
> Johannes Daldosch


  • Prev by Date: Re: any civil engineers on this list?
  • Next by Date: Re: Square wave form
  • Previous by thread: Square wave form
  • Next by thread: Re: Square wave form