⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ggdemo.m

📁 这个matlab程序用于实现广义高斯分布的参数估计
💻 M
字号:
% GGDEMO
% Demonstrations of the main functions in the generalized Gaussian density package
%
% Author: Minh N. Do, Dec. 1999

disp('Model parameter:')
mu = 0       % mean
alpha = 2     % scale
beta = 0.7    % shape

% Generate 10^4 random samples from the generalize Gaussian density
r = ggrnd(mu, alpha, beta, 1, 1000)
%r = [2  8  7  8  10  13  18  13  40  44  786  41  22  18  24  8  15  3  7  1  1];
disp('Moment matching estimate:');
[mu1, alpha1, beta1] = ggmme(r)

disp('Maximum likelihood estimate:');
[mu2, alpha2, beta2] = ggmle(r)


% Compare the estimated PDF's with the histogram
[N, X] = hist(r, 31);

clf;
bar(X, N ./ (X(2) - X(1)) / sum(N));
hold;

plot(X, ggpdf(X, mu1, alpha1, beta1), 'b');
plot(X, ggpdf(X, mu2, alpha2, beta2), 'r');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -