Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

# angvellog

Return logged angular velocity data from iOS sensor

## Syntax

``````[log, timestamp] = angvellog(m)``````

## Description

example

``````[log, timestamp] = angvellog(m)``` returns the angular velocity log, where `m` is the name of the `mobiledev` object that acquires the sensor data, `log` is an [`mx3`] matrix containing angular velocity data points, and `timestamp` is an [`mx1`] vector of timestamps.```

## 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.

Start MATLAB Mobile on your iOS device.

On the Sensors screen, tap the Angular Velocity sensor.

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 button in MATLAB Mobile.

Get the logged angular velocity data.

`[av, t] = angvellog(m)`

This returns the angular velocity log, where `av` contains the three data points in `X`, `Y`, and `Z` rotations, in radians per second.

See Device Orientation for a diagram showing the `X`, `Y`, and `Z` axes relative to the device.

## Output Arguments

collapse all

Name of variable for angular velocity log data, returned as an [mx3] matrix of data points from the Angular Velocity sensor on the iOS device. The three data points are the angular velocity reading in `X`, `Y`, and `Z` rotations, in radians per second.

Angular velocity is defined in relation to the `X`, `Y` and `Z` axes and in standard right-hand rotational vector notation. If you place the device face-up on a table, the positive X-axis extends out of the right side of the device, positive Y-axis extends out of the top side, and the positive Z-axis extends out of the front face of the device. This is independent of the orientation of the device.

Name of variable for timestamp, returned as an [mx1] vector of timestamps from the Angular Velocity sensor on the iOS device. Time is in seconds, relative to the `InitialTimestamp` property.

Download ebook