Hardware Support

Android Sensor Support from MATLAB

Use MATLAB to acquire accelerometer, magnetometer, orientation, location, and image data from built-in sensors on your Android device.

MATLAB supports the acquisition of data from built-in sensors on your Android™ device. With MATLAB Support Package for Android Sensors, you can log data or query the most recent data available from the supported sensors on your Android smartphone or tablet. You can then analyze the data in MATLAB or build applications that make decisions based on the sensor data.

To use this package, you must also install MATLAB Mobile™ on your Android device.

MATLAB Support Package for Android Sensors lets you acquire and log data from the supported Android sensors to obtain the following measurements:

  • Acceleration on 3-axes
  • Magnetic field on 3-axes
  • Angular velocity on 3-axes
  • Azimuth, roll, and pitch
  • Latitude, longitude, altitude, horizontal accuracy, speed, and course
  • Images from the integrated camera

With MATLAB Mobile, you can already log sensor data to MATLAB Drive™. With this support package, you can stream your sensor data over the internet to a MATLAB session. To do so, you must be logged in to MATLAB Mobile and a MATLAB session using the same MathWorks Account.

You can even connect and collect data from multiple devices simultaneously. This support package is pre-installed for MATLAB Online, which means you can also stream your device data directly to MATLAB Online.

Platform and Release Support

See the hardware support package system requirements table for current and prior version, release, and platform availability.

This support package is available on releases R2020b and later.

View enhancements and bug fixes in release notes.

Join the Community

Ask a question or share your files with the MATLAB community.

Explore gallery (2 images)