Main Content


Measure linear acceleration along X, Y, and Z axes in m/s2

  • Accelerometer block

Simulink Support Package for Apple iOS Devices / Sensors


The block measures linear acceleration along the X, Y, and Z axes. Units are in m/s2.

The figure shows the orientation of the positive X, Y, and Z axes for the Apple iOS device.

The orientation of the axes relative to the device remains constant. For example, if you place the device face-up on a table, the Z-axis measures the acceleration of Earth’s gravity and outputs about 9.81 m/s2. The X and Y axes, which are perpendicular to the acceleration of Earth’s gravity, both output about 0.00 m/s2.


During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.



expand all

Accelerometer data of the device, returned as a three-element numeric vector of the form [X,Y,Z].

Data Types: single


expand all

Specify a discrete time interval, in seconds, at which the block reads the accelerometer sensor of the device and outputs the data.


Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2015a