Construct an error ellipse age a given confidence level from its centre and covariance matrix
ellipse(x, y, covmat, alpha = 0.05, n = 50)
x-coordinate (scalar) for the centre of the ellipse
y-coordinate (scalar) for the centre of the ellipse
covariance matrix of the x-y coordinates
the probability cutoff for the error ellipses
the resolution of the error ellipses
an [n x 2
] matrix of plot coordinates
# NOT RUN {
x = 99; y = 101;
covmat <- matrix(c(1,0.9,0.9,1),nrow=2)
ell <- ellipse(x,y,covmat)
plot(c(90,110),c(90,110),type='l')
polygon(ell,col=rgb(0,1,0,0.5))
points(x,y,pch=21,bg='black')
# }
Run the code above in your browser using DataLab