matlab中normfit的使用

最近在写论文的过程中,利用RFV(随机模糊变量)表示传感器的不确定性,需要求一组数据均值和标准差,在matlab中找到了normfit函数,具体的使用的方法以及语法如下.

normfit:

Normal parameter estimates

normfit函数的语法:

[muHat,sigmaHat] = normfit(x)

x:输入的数据
muHat:表示正态分布中均值μ的估计值;
sigmaHat:表示正态分布中标准偏差σ的估计值;

[muhat,sigmahat,muci,sigmaci] = normfit(x) 

各个参数的具体含义如下:
x:输入的数据
muhat:表示正态分布中均值μ的估计值;
sigmahat:表示正态分布中标准偏差σ的估计值;
muci:为置信区间;
sigmaci:为置信区间对应的置信度.

[muHat,sigmaHat,muCI,sigmaCI] = normfit(x,alpha) 

[muHat,sigmaHat,muCI,sigmaCI] = normfit(x,alpha) specifies the confidence level for the confidence intervals to be 100(1–alpha)%.via 官方文档

alpha:指定置信度(1-alpha)的置信区间

下面举一个例子(官方文档中的例子):

rng('default') % For reproducibility
x = normrnd(3,5,[1000,1]);
% Find the parameter estimates and the 99% confidence intervals.
[muHat,sigmaHat,muCI,sigmaCI] = normfit(x,0.01)

输出的结果:

muHat = 2.8368
sigmaHat = 4.9948
muCI = 2×1

    2.4292
    3.2445

sigmaCI = 2×1

    4.7218
    5.2989

muHat is the sample mean, and sigmaHat is the square root of the unbiased estimator of the variance. muCI and sigmaCI are the 99% confidence intervals of the mean and standard deviation parameters. The first row is the lower bound, and the second row is the upper bound.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值