Main Content

Sensor Data Collection

Collect data from your mobile device position and motion sensors, camera, and microphone

With MATLAB®, MATLAB Mobile™, or MATLAB Online™, you can acquire and log sensor and camera data from your mobile device. Use MATLAB to process this data in various ways, such as plots and processing images.

You can collect data from these device sensors:

  • Acceleration

  • Angular velocity

  • Magnetic field

  • Orientation

  • Position

  • Camera

  • Microphone

You can set camera properties including resolution, autofocus, and flash. You can set microphone properties such as sampling rate.

Add-On Required

To access mobile device sensors remotely from MATLAB installed on a desktop or laptop computer, you must also install either MATLAB Support Package for Apple iOS Sensors or MATLAB Support Package for Android® Sensors. For more information, see Get and Manage Add-Ons.

Functions

expand all

mobiledevCreate mobiledev object to acquire data from mobile device sensors
mobiledevlistList of mobile devices with accessible sensor data (Since R2020b)
accellogReturn logged acceleration data from mobile device sensor
angvellogReturn logged angular velocity data from mobile device sensor
magfieldlogReturn logged magnetic field data from mobile device sensor
orientlogReturn logged orientation data from mobile device sensor
poslogReturn logged position data from mobile device sensor
discardlogsDiscard all logged data from mobile device sensors
readMobileSensorDataImport collected data file from mobile device via USB connection
readAudioRead collected audio data from mobile device (Since R2022b)
cameraConnection to camera on mobile device
snapshotAcquire single image frame from mobile device camera

Topics

Get Started with Sensors

Log Sensor Data Locally

Stream Sensor Data to MATLAB

Acquire Audio and Images from Device

Featured Examples