Main Content

vrrotvec

(To be removed) Calculate rotation between two vectors

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

    Description

    r = vrrotvec(a,b) calculates a rotation needed to transform the 3D vector a to the 3D vector b.

    r = vrrotvec(a,b,options) calculates the rotation with the default algorithm parameters replaced by values defined in options.

    Input Arguments

    collapse all

    3-D vectors between which rotation is being calculated.

    Data Types: single | double

    Structure containing the parameter epsilon that represents the value below which a number will be treated as zero (default value is 1e-12). Default value of epsilon is 1e-12.

    Data Types: struct

    Output Arguments

    collapse all

    Axis-angle rotation, returned as a four element row vector. The first three elements specify the rotation axis, and the last element defines the angle of rotation.

    Version History

    Introduced in R2007b

    collapse all

    R2023b: To be removed

    The vrrotvec will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.