MathGroup Archive 2001

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

Search the Archive

Re: Square wave form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29307] Re: Square wave form
  • From: bghiggins at ucdavis.edu (Brian Higgins)
  • Date: Tue, 12 Jun 2001 04:18:25 -0400 (EDT)
  • References: <9g20it$6qf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Johannes, Try this:

g[x_ /; 0 <= x <= \[Pi]] := 1
g[x_ /; \[Pi] <= x <= 2\[Pi]] := 0
g[x_] := g[Mod[x, 2\[Pi]]]
Plot[g[x], {x, -14, 14}, PlotStyle -> RGBColor[0, 0, 1], 
    AxesLabel -> {"x", "g(x)"}];

Cheers,
Brian



daldosch <daldosch at ccc.at> wrote in message news:<9g20it$6qf$1 at smc.vnet.net>...
> 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: MathReader, Linux installation?
  • Next by Date: Re: JLink on Linux with Sun JDK 1.3.1
  • Previous by thread: Re: Square wave form
  • Next by thread: Re: Experience with Mathcode++?