?? visualizationguassdata.m
字號:
% To create a 1D Gaussian Distribution and show its histogram
model = struct('Mean',1,'Cov',2); % Gaussian parameters
figure(1); hold on;
% plot pdf of the Gaussisan Distribution
X_theo=[-4:0.2:5];
Y_theo=pdfgauss(X_theo,model);
Y_theo=Y_theo/sum(Y_theo);
plot(X_theo,Y_theo,'r');
[Y,X] = hist(gsamp(model,500),50); % compute histogram
bar(X,Y/500); % plot histogram
% To create a 2D Gaussian Distribution and show its histogram
model.Mean = [1;1]; % Mean vector
model.Cov = [1 0; 0 1]; % Covariance matrix
figure(2); hold on;
data=gsamp(model,250);
ppatterns(data); % plot sampled data
pgauss(model); % plot shape
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -