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