Main Content

vrrotvec

Calculate rotation between two vectors

    Description

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

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

    Input Arguments

    collapse all

    3-D vectors between which rotation is being calculated.

    Data Types:single|double

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

    Data Types:结构体

    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