Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2691 > unrolled thread
| Started by | Barrie Stokes <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| First post | 2011-05-25 09:55 +0000 |
| Last post | 2011-05-25 09:55 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: How to plot y=f(x) or given y interval? Barrie Stokes <Barrie.Stokes@newcastle.edu.au> - 2011-05-25 09:55 +0000
| From | Barrie Stokes <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| Date | 2011-05-25 09:55 +0000 |
| Subject | Re: How to plot y=f(x) or given y interval? |
| Message-ID | <irijnf$qd4$1@smc.vnet.net> |
Hi Alexandre
Here are some ideas:
Plot[ Sin[x], {x, 0, 6 \[Pi]} ]
Plot[ Sin[x], {x, 0, 6 \[Pi]}, PlotRange -> {-0.5, +0.5} ]
sinTruncated1[ x_ ] := If[ -0.5 <= Sin[x] <= +0.5, Sin[x]]
Plot[ sinTruncated1[x], {x, 0, 6 \[Pi]}, PlotRange -> {-1, 1} ]
sinTruncated2[ x_ ] :=
Which[ -0.5 <= Sin[x] <= +0.5, Sin[x], Sin[x] < -0.5, -0.5,
Sin[x] > +0.5, +0.5]
Plot[ sinTruncated2[x], {x, 0, 6 \[Pi]}, PlotRange -> {-1, 1} ]
You will get many more from other Group members.
Cheers
Barrie
>>> On 24/05/2011 at 7:59 pm, in message <201105240959.FAA12225@smc.vnet.net>,
Alexandre Araripe <araripe@ufba.br> wrote:
> HI,
>
> How can I plot a function y=f(x) for a given y interval?
> Thank in advance
> Araripe
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web