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

📄 gausspdf.m

📁 一个目标跟踪系统的MATLAB 源程序包
💻 M
字号:
% GAUSSPDF.M   Calculate Gaussian (normal) pdf value
% 
% function y=gausspdf(x,mean,cov)
%
% input parameters:
%    x     ----- the pdf value to be evaluated
%    mean  ----- the mean of Gaussian RV
%    cov   ----- the covariance of Gaussian RV
% output parameters:
%    y     ----- the value of the corresponding pdf evaluated at x
function y=gausspdf(x,mean,cov)
% make the inputs x and mean be column vectors
if size(x,2)>1
    x=x';
end
if size(mean,2)>1
    mean = mean';
end

y=exp(-0.5*((x-mean)'*inv(cov)*(x-mean)))/sqrt(det(2*pi.*cov));

⌨️ 快捷键说明

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