如何在Matlab中生成Weibull参数k和c? [英] How to generate the Weibull's parameters k and c in Matlab?
本文介绍了如何在Matlab中生成Weibull参数k和c?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以向我解释如何在Matlab中生成Weibull分布参数k和c吗?
Can anyone explain to me how to generate the Weibull distribution parameters k and c, in Matlab?
我有一个8000风速数据文件,我想执行以下操作:
I have a file of 8000 data of wind speed, and I'd like to do the following:
- 生成这些参数的Weibull的k和c参数.
- 根据风速绘制概率密度函数.
我是Matlab的新手,尚未能够做到这一点.
I am new in Matlab and have not yet been able to do this.
推荐答案
If you have the Statistics toolbox, you can use fitdist
:
pd = fitdist(x,'Weibull')
其中x
是您的数据.我猜它应该在以下位置返回参数a
和b
:
where x
is your data. I'm guessing it should return the parameters a
and b
in:
然后您可以使用 pdf
功能.在fitdist
的文档中有一些示例(尽管是正态分布).
You can then calculate the pdf (and plot it) using the pdf
function. There are some examples (albeit for a normal distribution) in the documentation for fitdist
.
这篇关于如何在Matlab中生成Weibull参数k和c?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文