amvee | R Documentation |
Given a set of current x/y positions, this function computes an approximation of their minimum volume enclosing ellipsoid.
amvee(x)
x |
A matrix with two columns corresponding to the x and y positions for which to compute the ellipsoid. |
A vector with 5 elements: the x and y coordinated of the center of the ellipsoid, the width and height of the ellipsoid, and the angle of the ellipsoid relative to the y axis.
Simon Garnier, garnier@njit.edu
x <- rnorm(25, 4) y <- rnorm(25, 2) ell <- amvee(cbind(x, y)) plot(x, y, asp = 1) lines(ellipse(ell[1], ell[2], ell[3], ell[4], ell[5]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.