Main Content

Sensor Data Collection

Collect sensor data from your device

With MATLAB® Mobile™ or MATLAB Online™, you can collect sensor and camera data from your Android™ device and log the data in MATLAB. Use MATLAB to process this data in various ways, including creating plots, or, for camera data, process the images.

You can collect data from these sensors:

  • Acceleration

  • Angular velocity

  • Magnetic field

  • Orientation

  • Position

You can also access the camera and acquire images on your Android mobile device from MATLAB Mobile or MATLAB Online. You can set camera properties including resolution, autofocus, and flash.


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
cameraConnection to camera on Android device
snapshotAcquire single image frame from Android device camera


Get Started with Sensors

Log Sensor Data Locally

Stream Sensor Data to MATLAB on the Cloud

Android Camera Image Acquisition