# vrcoordvr2m

(To be removed) Convert VR coordinates to MATLAB coordinates

Since R2019a

`vrcoordvr2m` will be removed in a future release. For more information, see Version History.

## Syntax

``m = vrcoordvr2m(vr)``

## Description

example

````m = vrcoordvr2m(vr)` converts a point with coordinates in the Virtual World coordinate system to the MATLAB® coordinate system.```

## Examples

collapse all

This example creates a simple plane take-off trajectory in the virtual reality coordinate system and plots it in MATLAB using `plot3`.

The plane starts in the +x direction and goes up (positive values of y coordinate) in the z=0 plane. We then convert the trajectory to MATLAB coordinates, so that it can be displayed in a 3D figure using the MATLAB `plot3` command.

Define a simple take-off trajectory

`vrpath = [0 0 0; 1 0 0; 2 0.2 0; 3 0.5 0; 4 1 0];`

Convert the path from virtual reality coordinates to MATLAB coordinates

`mpath = vrcoordvr2m(vrpath);`

Display the path in a 3D plot using the plot3 command

`plot3 (mpath(:,1), mpath(:,2), mpath(:,3))`

## Input Arguments

collapse all

Coordinates of a point in VRML notation, specified as a 3-element row vector.

Data Types: `double`

## Output Arguments

collapse all

Coordinates of a point in MATLAB notation, returned as a 3 element row vector.

## Version History

Introduced in R2019a

collapse all

### R2023b: To be removed

The `vrcoordvr2m` function will be removed in a future release. Instead, use `sim3d` classes and Simulation 3D blocks in Unreal Engine Scenario Applications to interface MATLAB and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Get Started Creating Virtual World with Actors.