Android Sensor support from MATLAB (R2013a, R2013b)

Use MATLAB to acquire sensor data from built-in sensors on your Android device.
Updated 23 Oct 2014

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

For Android Sensor support in R2014a and higher releases see:
This submission enables MATLAB to access onboard sensors on Android mobile devices. With this submission, you can access a mobile device’s accelerometer, magnetometer, location, orientation and compass information directly from MATLAB running on your computer. You can access current and logged sensor data, and you can use MATLAB to visualize and analyze the mobile sensor data or make decisions based on the acquired data.
To use this submission, the computer and mobile device must be on the same network. The submission includes the necessary MATLAB files and a read me document for initial setup.
In order to use this support, you must first install the “Sensor UDP” mobile app available from Google Play.

For more information about MATLAB Android sensor support:

Cite As

MathWorks Mobile Sensor Connectivity Team (2024). Android Sensor support from MATLAB (R2013a, R2013b) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Language Fundamentals in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Changed supported releases to 13a and 13b.

Added link to R2014b support.

Fixed problem with receiving data on Android phones with European settings. Enhanced install file(setupmobile.m) now checks for supported MATLAB versions. Minor documentation updates.

Updated file.

Updated File and readme.

Updated file.

Updated File