필터 지우기
필터 지우기

Calculating own distribution of data set

조회 수: 2 (최근 30일)
Joanna Smietanska
Joanna Smietanska 2019년 10월 17일
답변: Sri Harsha Kondapalli 2019년 10월 17일
I have data collected in some 150x1 vector. My goal is to calculate distribution of this values according to this formula, where α, β and B0 are some input parameters selected by user:
I wrote function to calculate distribution for whole data set, but the result is vector of 150x1 size filled with complex numbers, which is totally incoherent with my expected distribution. May I ask for help with correct calculation of this distribution?
function [y] = distribution(B,B0,alfa,beta)
GM = gamma(alfa);
for i = 1:length(B(:,1))
y(i,1) = (((beta^alfa)/Y)*((B(i,1)-B0).^(-alfa-1)))*(exp(-(beta/(B(i,1)-B0))));
end
  댓글 수: 1
darova
darova 2019년 10월 17일
Maybe is float number and is negative. What do you think?

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

답변 (1개)

Sri Harsha Kondapalli
Sri Harsha Kondapalli 2019년 10월 17일
Use histogram for obtaining a distribution function of the data set and then use curve fitting toolbox to estimate the parameters in your distribution.

Community Treasure Hunt

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

Start Hunting!

Translated by