a = axis(joy, n) reads the status of joystick
with axis number
n. Axis status is returned in
the range of -1 to 1. The
n parameter may be a
vector to return multiple buttons.
b = button(joy, n) reads the status of joystick
n. Button status is returned as logical
0 if not pressed and logical 1 if pressed. The
may be a vector to return multiple buttons.
c = caps(joy) returns joystick capabilities,
such as the number of axes, buttons, POVs, and force-feedback axes.
The return value is a structure with fields named
close(joy) closes and invalidates the joystick
object. The object cannot be used once it is closed.
force(joy, n, f) applies force feedback
to joystick axis
can be a vector to affect multiple axes.
should be in range of -1 to 1, and the number of elements in
either match the number of elements of
be a scalar to be applied to all the axes specified by
p = pov(joy, n) reads the status of joystick
POV (point of view) of control number
usually returned in degrees, with -1 meaning "not selected."
be a vector to return multiple POVs.
[axes, buttons, povs] = read(joy) reads
the status of axes, buttons, and POVs of the specified joystick.
buttons, povs] = read(joy, forces) applies feedback forces,
in addition, to a force-feedback joystick.