How to calculate the pdf (probability distribution function) of a data having dimension 25x31x122?

조회 수: 22 (최근 30일)
Hi,
I have a data with rainfall value as dim of 25x31x122 and I want to calculate the pdf and plot it.
Can anyone suggest me how to do in matlab?

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 3일
One way to do it is using the histogram-function, see the help and documentation. Something like this:
histogram(rainfall(:),min(rainfall(:)):max(rainfall(:)),'Normalization','pdf')
Or you could do the same/similar using ksdensity. But you surely have some type of variation (day-of-year?) in the different dimensions?
HTH
  댓글 수: 2
UTKARSH VERMA
UTKARSH VERMA 2021년 2월 3일
Hi,
can you help me with these commands:
pdf_normal = pdf(pd,A{1,4});
plot(rainfall{1,4}(:,:,:),pdf_normal,'LineWidth',2)
I don't want histogram graph.
Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 3일
No. You want to get a pdf that fits your rainfall. For that the histogram-plot is the first step to take to get some feel for what the distribution looks like. Once you do that you can use fitdist from the statistics toolbox, or ksdensity. If these tools are not right you can always turn to the file exchange to find tools like these:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by