File: sensitivity.gnuplot

package info (click to toggle)
xboxdrv 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,252 kB
  • sloc: cpp: 19,297; xml: 3,202; ansic: 507; python: 483; sh: 89; makefile: 34; ruby: 19
file content (20 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Plot the function that is used for --axis-sensitivity

set title "Axis Sensitivity"
set output "sensitivity.svg"
set terminal svg
set xlabel "Axis Input"
set ylabel "Axis Output"

set xrange [0:1]
set yrange [0:1]
set size ratio 1

f(x,t) = (1 - (1 - x)**(2**t))**(1/(2**t))
g(x,t) = 1 - (1 - x**(2**(-t)))**(1/(2**(-t)))
s(x) = sgn(abs(x) - x)
h(x,t) = (1 - s(t)) * f(x,t) + s(t) * g(x,t)

plot h(x,4.0), h(x,2.0), h(x,1.0), h(x,0.5), h(x,0.0), h(x,-0.5), h(x,-1.0),  h(x,-2.0), h(x,-4.0)

# EOF #