问题
Can anyone explain to me how to generate the Weibull distribution parameters k and c, in Matlab?
I have a file of 8000 data of wind speed, and I'd like to do the following:
- Generate the Weibull's k and c parameters of those.
- Plot the probability density function against the wind speed.
I am new in Matlab and have not yet been able to do this.
回答1:
If you have the Statistics toolbox, you can use fitdist:
pd = fitdist(x,'Weibull')
where x
is your data. I'm guessing it should return the parameters a
and b
in:
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
.
来源:https://stackoverflow.com/questions/19020238/how-to-generate-the-weibulls-parameters-k-and-c-in-matlab