To collect sensor data in MATLAB Mobile, you can use the "Sensors" tab in the app. Here's some sample code to collect data from the accelerometer sensor:
main.m318 chars19 lines
This code connects to the mobile device, sets up the accelerometer sensor, collects data for 5 seconds, retrieves the logged data, and then plots the data. You can modify the code to collect other types of sensor data as well, such as GPS or microphone data.
gistlibby LogSnag