Learn R Programming

RSpincalc (version 1.0.2)

Qrandom: Generate uniform random unit quaternions

Description

Qrandom generates uniform random unit quaternions.

Usage

Qrandom(n=NA)

Arguments

n
Optional integer for the number of generated quaternions, default = 1.

Value

Q
Uniform random unit quaternion (Q) vector [q1, q2, q3, q4] or matrix n x 4.

Examples

Run this code
Qrandom()
Qrandom(5)

Run the code above in your browser using DataLab