MathGroup Archive 2007

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

Search the Archive

Re: How to express this function.


"huxiaopengstat at gmail.com" <huxiaopengstat at gmail.com> wrote:
> f is  a period continual function with period  1.
> f equals x when 0<x1/2,equals -x when -1/2<x<1.

I must suppose that you meant -x when -1/2<x<0.

> How to express this function?

There are many ways to do that in Mathematica. One way, using the Floor
function, is

f[x_]:= (-1)^Floor[2 x] ((2 x - Floor[2 x])/2 - 1/4) + 1/4

David


  • Prev by Date: Re: Have I found a bug?
  • Next by Date: Re: How to express this function.
  • Previous by thread: How to express this function.
  • Next by thread: Re: Re: How to express this function.