discardlogs

Discard all logged data from iOS sensors

Syntax

discardlogs(m)

Description

example

discardlogs(m) discards all logged data, from m, the mobiledev object that acquires the sensor data. The discardlogs function discards all logged measurements that were created from the object, and also clears the initial timestamp.

Examples

collapse all

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. For information about these steps, see Get Started with iOS Sensors (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.

On your computer, create a mobiledev object, m, in MATLAB.

m = mobiledev

Begin logging data by enabling the Logging property.

m.Logging = 1

This action starts the transmitting of data from all selected sensors. You can also start transmission by tapping the Start button in MATLAB Mobile on the device.

Get any logged data you are interested in viewing, for example, the angular velocity data.

[av, t] = angvellog(m);

Stop logging data from the selected sensors by disabling the Logging property.

m.Logging = 0

This stops the transmitting of data from all selected sensors. You can also stop transmission by tapping the Stop button in MATLAB Mobile.

You can still access any of the logs after you stop transmitting data. When you are done using the logs, you can discard them.

discardlogs(m)

This discards all logged measurements and also the initial timestamp.

See Also

| | | | | |

Topics

Introduced in R2015a