
Last chance! 50% off unlimited learning
Sale ends in
A
of dimension 2 by
2 and a constant cn
, or the axes a, b
and an angle
phi
(in radian, counter clockwise), and the midpoint
coordinates m
, points on the ellipse $(y-m)'*A^{(-1)}*(y-m) = cn^2$ or
rotm(2,1,2,phi) %*% matrix(c(a,0,0,b), 2, 2) will be generated.ellipse(k, m, A, cn)
ellipse(k, m, a=, b=, phi=)
conf.ellipse(k, m, A, df, level = 0.95)
rotm
A <- matrix(c(1,1,1,2), ncol = 2) # define matrix A
m <- c(3, 4) # define vector m
plot(ellipse(1000,m,A,1))
plot(pe <- ellipse(800,m,A,1),pch=".",type="n")
lines(rbind(pe,pe[1,]))
lines({pe <- ellipse(600,m,A,0.5); rbind(pe,pe[1,])})
lines({pe <- ellipse(400,m,A,0.25); rbind(pe,pe[1,])})
lines(conf.ellipse(51,m,A,20,0.9),lty=4,col="red")
lines(conf.ellipse(51,m,A,20,0.8),lty=4,col="green")
Run the code above in your browser using DataLab