二维正态分布均值为μ ,方差为σ^2,在MATLAB中绘制其3σ边界的代码如下。
% Mu is mean value, Sigma is variance
PointsNum = 40;
t = linspace(-pi, pi, PointsNum)’;
stdev = sqrtm(3.0.*Sigma);
X = [cos(t) sin(t)] * real(stdev) + repmat(Mu’,PointsNum,1);
plot(X(:,1),X(:,2),’r-’,’LineWidth’,2)
转载请注明:王杭州的个人网页 » 绘制二维正态分布的3σ边界