www.gusucode.com > stats 源码程序 matlab案例代码 > stats/EstimateMultivariateKernelDensityExample.m

    %% Estimate Multivariate Kernel Density


%% 
% Load the Hald cement data.
load hald

%%
% The data measures the heat of hardening for 13 different cement
% compositions. The predictor matrix |ingredients| contains the percent
% composition for each of four cement ingredients. The response matrix
% |heat| contains the heat of hardening (in cal\g) after 180 days.

%%
% Estimate the kernel density for the first three observations in
% |ingredients|.
xi = ingredients(1:3,:);
f = mvksdensity(ingredients,xi,'bandwidth',0.8);