Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2691

Re: How to plot y=f(x) or given y interval?

From Barrie Stokes <Barrie.Stokes@newcastle.edu.au>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to plot y=f(x) or given y interval?
Date 2011-05-25 09:55 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <irijnf$qd4$1@smc.vnet.net> (permalink)

Show all headers | View raw


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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How to plot y=f(x) or given y interval? Barrie Stokes <Barrie.Stokes@newcastle.edu.au> - 2011-05-25 09:55 +0000

csiph-web