function y = ricepdf(x, sigma) % RICEPDF calculates the probability density function of Rice distribution % with standard deviation sigma, at x. % % Input: % x: independent variable of the PDF % sigma: standard deviation of the Rice distribution % % Output: % y: probability density function of the Rice distribution at x

% Check input arguments if nargin ~= 2 error('Two input arguments are required.'); end

% Check if sigma is positive if sigma <= 0 error('Standard deviation must be positive.'); end

y = x./sigma.^2 .* exp(-0.5.(x.^2 + sigma.^2)./(sigma.^2)) . besseli(0, x.*sigma./(sigma.^2));

end

基于matlab编写一个函数脚本函数名为ricepdf作用是计算莱斯分布的PDF函数有两个变量变量x表示PDF的自变量sigma表示莱斯分布的标准差

原文地址: https://www.cveoy.top/t/topic/bqEP 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录