demo_chi_square.m
来自「This a collection of MATLAB functions fo」· M 代码 · 共 25 行
M
25 行
function demo_chi_square()
%function demo_chi_square
%
% Demonstrate simple use of the chi-square probability density function,
% probability mass function, and probability bound.
%
% Tim Bailey 2005.
x = 0:0.1:12; % x-axis domain
prob = 0.95; % 95% bound
D = 3; % dimension
f = chi_square_density(x, D);
F = chi_square_mass(x, D);
xb = chi_square_bound(prob, D);
figure
subplot(2,1,1)
plot(x,f, [xb xb], [0 0.4])
title(['Density function of degree ', num2str(D), '. Bound indicates ', num2str(prob*100),'% of area is to the left.'])
subplot(2,1,2)
plot(x,F, [xb xb], [0 1])
title(['Mass function of degree ', num2str(D), '. Bound indicates where y-axis = ', num2str(prob),'.'])
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?