Sgn (gnuplot)

From Wiki4Intranet
Revision as of 17:53, 5 April 2012 by VitaliyFilippov (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

sgn(x) возвращает:

если аргумент положительный,
если отрицательный,
если аргумент равен 0.

Если аргумент комплексный, мнимая часть игнорируется.

set yrange [-2:+2]
set xrange [-5:+5]
plot sgn(x)

gnuplot> set encoding utf8

        line 0: expecting one of 'default', 'iso_8859_1', 'iso_8859_2', 'iso_8859_15', 'cp437', 'cp850', 'cp852', 'koi8r' or 'koi8u'

Could not find/open font when opening font Arial, using default

Статья реплицируется в Wiki4IntraNet.