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


Groups > comp.graphics.apps.gnuplot > #3814

Re: Piecewise function in gnuplot?

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Piecewise function in gnuplot?
Date Wed, 8 Nov 2017 18:21:19 +0100
Organization solani.org
Lines 24
Message-ID <otveef$95j$1@solani.org> (permalink)
References <16c3d30b-38eb-4028-9a9a-4a30b869be1a@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1510161679 9395 eJwVyckNwDAMA7CVfMryOIXS7D9CUX7ZCYem0Ki+fYMjMTz2bBlf+wMh+EyalldMnEq3eIz1AffxD4s= (8 Nov 2017 17:21:19 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Wed, 8 Nov 2017 17:21:19 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
Content-Language de-DE-1901
In-Reply-To <16c3d30b-38eb-4028-9a9a-4a30b869be1a@googlegroups.com>
X-NNTP-Posting-Host eJwFwYEBwDAEBMCVKE+ME+r3HyF3sNCY9EA4CI7glqCH61lrpks6AmLlgHCp7XvqS/T9zwMceBEQ
X-User-ID eJwFwYkBgDAIA8CV5Emi41AK+4/gHYLGVhJMLHYBA9yQ9WbVjnT4+I0zLU2MNWNu2u12xfcDF2ARLg==
Cancel-Lock sha1:f121wLkheZ9IYC//ZQBVBUlNueE=
Xref csiph.com comp.graphics.apps.gnuplot:3814

Show key headers only | View raw


Am 08.11.2017 um 14:21 schrieb Lawrence Bottorff:
> I've seen a gnuplot treatment of piecewise functions:
> 
> http://www.gnuplotting.org/defining-piecewise-functions/comment-page-1/ 
> 
> but I need something that looks like this:
> 
> https://www.khanacademy.org/math/algebra/absolute-value-equations-functions/piecewise-functions/v/piecewise-function-example

What's the difference between what's shown on the two pages (sorry, not
watching that youtube video)? You can of course let the ternary operator
return the result of any kind of valid mathematical expressions, not
just constants.

  f(x) = x**2 > 5 ? -x**2 : 2*x

  g(x) = x < 0 ? h(x) : i(x)

That what you mean?

Best, Karl


Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Piecewise function in gnuplot? Lawrence Bottorff <borgauf@gmail.com> - 2017-11-08 05:21 -0800
  Re: Piecewise function in gnuplot? Karl Ratzsch <mail.kfr@gmx.net> - 2017-11-08 18:21 +0100
    Re: Piecewise function in gnuplot? Lawrence Bottorff <borgauf@gmail.com> - 2017-11-08 11:58 -0800
      Re: Piecewise function in gnuplot? Karl Ratzsch <mail.kfr@gmx.net> - 2017-11-09 08:13 +0100

csiph-web