开发者

2D Distribution Region of Interest

Given a 2D distribution. See image:

2D Distribution Region of Interest

),

How can I find the Region of Interest that contains 90% or开发者_开发技巧 95% of the data in matlab?

Many thanks


Use error_ellipse to obtain the required confidence region. All you need to do is give it the covariance matrix (easily obtained with cov(D) where D is matrix where each row is a mean-shifted point)

Sample code:

D = randn(1000,2);
mu = mean(D);
Dm = bsxfun(@minus,D,mu);
error_ellipse(cov(Dm),'conf',0.95,'mu',mu);
hold on;
plot(D(:,1),D(:,2),'r*');

2D Distribution Region of Interest

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜