mobiledev object to acquire data from iOS
m = mobiledev creates an object
that reads sensor data from an iOS device running MATLAB®
Mobile™ that is connected to the same network as a computer running
MATLAB. The object can read data from five types of sensors:
acceleration, angular velocity, orientation, magnetic field, and
This example assumes that you have already installed and set up MATLAB Mobile on your iOS device and connected it to your computer running MATLAB. If you have not, see Install MATLAB Mobile on Your Apple iOS Device (MATLAB Mobile for iOS).
Start MATLAB Mobile on your iOS device.
On the Sensors screen, tap the sensors that you want to send data from.
Place the device where you want to get the sensor data.
In MATLAB on your computer, create a
m = mobiledev
mobiledev with properties: Connected: 1 Logging: 0 InitialTimestamp: '' AccelerationSensorEnabled: 1 AngularVelocitySensorEnabled: 1 MagneticFieldSensorEnabled: 1 OrientationSensorEnabled: 1 PositionSensorEnabled: 1 Supported functions
In the display that is shown when you create the object, a value
1 means enabled or on, and
0 means not enabled or off. The device and
computer are connected, but data is not being sent (logged)
To begin logging data, enable the
m.Logging = 1
This action starts the transmitting of data from all selected sensors.