📄 plotgaus.m
字号:
function [h] = plotgaus( mu, sigma, colspec );
% PLOTGAUS 啊快矫救 牧捧绢 弊妨焊扁
%
% PLOTGAUS(MU,SIGMA,COLSPEC)
% MU : 乞闭
% SIGMA : 傍盒魂
% 祸彬瘤沥牢磊 COLSPEC = [R,G,B].
% PLOTGAUS(MU,SIGMA)老 版快, 叼弃飘 祸惑篮 [0 1 1] (cyan).
%
if nargin < 3; colspec = [0 1 1]; end;
npts = 100;
stdev = sqrtm(sigma);
t = linspace(-pi, pi, npts);
t=t(:);
X = [cos(t) sin(t)] * stdev + repmat(mu,npts,1);
h(1) = line(X(:,1),X(:,2),'color',colspec,'linew',2);
h(2) = line(mu(1),mu(2),'marker','+','markersize',10,'color',colspec,'linew',2);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -