Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#51 2012-02-21 02:46:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Cool graphs using the sgn(x) function!!!

Hi anonimnystefy;

That is not correct. It is defined for 0.
Sign[0] = 0.

Here is how it is defined in Wikipedia.

http://en.wikipedia.org/wiki/Sign_function


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#52 2012-02-21 08:46:05

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi bobbym

really.oh well.we can take it one the same interval just excluding the zeors of the functions.so for the last function which has three parts we would look at it just over the R\{-1,1}


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#53 2012-02-21 09:06:54

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

anonimnystefy wrote:

found it:The function

Hi anonimnystefy;

It's a nice expression!

Here is another expression: y = 0.5 sgn(x) (1 + sgn(abs(x) - 1)).

Offline

#54 2012-02-21 09:38:00

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi benice

thank you! big_smile

now i just need to find the general formula.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#55 2012-02-21 10:21:48

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

anonimnystefy wrote:

hi benice

thank you! big_smile

now i just need to find the general formula.

y = 0.5 (a sgn(x + 1) + b sgn(x - 1))

Last edited by benice (2012-02-21 11:00:20)

Offline

#56 2012-02-22 09:11:23

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi benice

thanks for that formula as well.but i wanted the formula which will give the three lines at hights of a,b and c,respectively.

if you find anything let me now.once again,thank you for the formulas. big_smile


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#57 2012-02-22 09:25:33

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi benice

i think i found one,but i don't know if it works for all heights and distances:

where a,b and c are the heights i mentioned and d and e are the distances of the breakings in the interval or in other words, d and e are the points where the sgn(x) function breaks according to our 'definition'.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#58 2012-02-22 14:06:53

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

anonimnystefy wrote:

hi benice

i think i found one,but i don't know if it works for all heights and distances:

where a,b and c are the heights i mentioned and d and e are the distances of the breakings in the interval or in other words, d and e are the points where the sgn(x) function breaks according to our 'definition'.

Assume d < e.

x<d
=> y = 0.5[(a+c) + (b-a)(-1) + (c-b)(-1)] = 0.5[a+c-b+a-c+b] = a

d<x<e
=> y = 0.5[(a+c) + (b-a)(1) + (c-b)(-1)] = 0.5[a+c+b-a-c+b] = b

x>e
=> y = 0.5[(a+c) + (b-a)(1) + (c-b)(1)] = 0.5[a+c+b-a+c-b] = c

Last edited by benice (2012-02-22 14:09:21)

Offline

#59 2012-02-22 14:32:47

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

Hi anonimnystefy;

You can use the sgn function to generate curves with dashed line:

x = sgn(cos(32t)) cos(t)
y = sgn(sin(32t)) sin(t)


x = sgn(cos(512t)) [cos(t) + sin(2t)]
y = sgn(sin(512t)) [sin(t) - sin(2t)]


x = sgn(cos(nt)) f(t)
y = sgn(sin(nt)) g(t)

Last edited by benice (2012-02-22 14:35:57)

Offline

#60 2012-02-24 06:25:54

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi benice

now those are some nice graphs.thanks for sharing that.

just wondering,you wrote there three formulas,and there are two graphs.which formula is for which graph?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#61 2012-02-25 02:29:01

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Cool graphs using the sgn(x) function!!!

what is this "sgn" function?  Can you provide a definition of it.


igloo myrtilles fourmis

Offline

#62 2012-02-25 08:11:07

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Cool graphs using the sgn(x) function!!!

Hi John;

A few examples will do the trick:

sign(0) = 0

sign(+5) = 1

sign(+.3) = 1

sign(-2) = -1

sign(-200.34) = -1


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#63 2012-02-25 10:21:09

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

hi JEF

it's called the sign function.and as its name says,it gives us the "sign" of the number.for positive numbers it returns 1, for negative -1 and for 0 it returns zero.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#64 2012-02-25 16:41:33

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

anonimnystefy wrote:

just wondering,you wrote there three formulas ....

The third one is a general formula.

Offline

#65 2012-02-25 21:13:01

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

Hi benice

I don't know why I didn't notice it.

Are f(t) and g(t) random functions?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#66 2012-02-26 10:06:25

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

anonimnystefy wrote:

Are f(t) and g(t) random functions?

f and g are arbitrary deterministic (non-random) functions.

Offline

#67 2012-02-26 12:02:29

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

Deterministic?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#68 2012-02-26 12:29:39

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Cool graphs using the sgn(x) function!!!

thanks for the examples (bobby) and definition (anom).


igloo myrtilles fourmis

Offline

#69 2012-02-26 12:31:54

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

You're welcome! smile


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#70 2012-02-26 14:15:12

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Cool graphs using the sgn(x) function!!!

Hi John E. Franklin;

Your favorite programming language might have that command built in.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#71 2012-02-27 01:44:48

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Cool graphs using the sgn(x) function!!!

Hi bobbym

And that is?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#72 2012-02-27 02:18:55

benice
Member
Registered: 2010-06-10
Posts: 117
Website

Re: Cool graphs using the sgn(x) function!!!

Hi anonimnystefy;

Here is a more general formula:
f(x) = 0.5 {f1(x) + f3(x) + sgn(x-a)[f2(x) - f1(x)] + sgn(x-b)[f3(x) - f2(x)]}

anonimnystefy wrote:

Deterministic?

http://en.wikipedia.org/wiki/Deterministic_system

Offline

#73 2012-02-27 03:45:10

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Cool graphs using the sgn(x) function!!!

Hi anonimnystefy;

And that is?

Sometimes Sgn, Signum or Sign.

While python and C++ do not, mathematica, maple, delphi, Maxima and VB do.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#74 2012-03-20 18:03:18

afridinazneen
Member
Registered: 2012-03-20
Posts: 1

Re: Cool graphs using the sgn(x) function!!!

I have gotten some good information here.

Offline

#75 2012-03-20 18:11:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Cool graphs using the sgn(x) function!!!

Hi;

Welcome to the forum!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB