Main Content

Android Sensors Data Acquisition

Acquire data from Android sensors

Acquiring sensor data streaming involves creating a mobiledev object, turning on the sensors, and logging data to MATLAB®. You can then process the logged data, including creating plots.

You can also acquire sensor data locally on the Android™ device, with or without a network connection. This is an alternative method of collecting the sensor data instead of streaming it from the device to your computer running MATLAB. This is especially useful if you want to collect sensor data while your device does not have a network connection.


For a complete up-to-date list of available functions for mobile device sensors, see MATLAB Mobile Functions.


mobiledevCreate mobiledev object to acquire data from Android sensors
mobiledevlistList of mobile devices with accessible sensor data
dispDisplay properties of mobiledev object
accellogReturn logged acceleration data from Android sensor
angvellogReturn logged angular velocity data from Android sensor
magfieldlogReturn logged magnetic field data from Android sensor
orientlogReturn logged orientation data from Android sensor
poslogReturn logged position data from Android sensor
discardlogsDiscard all logged data from Android sensors
readMobileSensorDataImport sensor data from file collected by MATLAB Mobile