?? plot_gaussian.m
字號:
function [hh] = plot_gaussian(covar,mu,col,n)
if ~isempty(find(covar-covar == 0))
if size(mu,1) < size(mu,2), mu = mu'; end
if size(covar,1) == 3
theta = (0:1:n-1)'/(n-1)*pi;
phi = (0:1:n-1)/(n-1)*2*pi;
sx = sin(theta)*cos(phi);
sy = sin(theta)*sin(phi);
sz = cos(theta)*ones(1,n);
svect = [reshape(sx,1,n*n); reshape(sy,1,n*n); reshape(sz,1,n*n)];
epoints = sqrtm(covar) * svect + mu*ones(1,n*n);
ex = reshape(epoints(1,:),n,n);
ey = reshape(epoints(2,:),n,n);
ez = reshape(epoints(3,:),n,n);
colourset = [1 0 0; 0 1 0; 0 0 1; 1 1 0; 1 0 1; 0 1 1];
colour = colourset(mod(col-1,size(colourset,1))+1,:);
hh = mesh(ex,ey,ez, reshape(ones(n*n,1)*colour,n,n,3) );
hidden off
light
% EPS 屈僥欄肺 瘤瀝等 頗老俊 歷厘且 薦 樂霸 官操扁困秦輯綽
% 'mesh' 疙飛籃 秦惑檔甫 棵妨 弊妨林絹具 茄促. 撈 版快俊綽 困狼 5臨 措腳 促覽
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -