I have a vector y
containing 1440 values (values are between 0-1) that looks like a Gaussian distribution.
Therefore I would like to find the best fitting gaussian distribution to have a model.
x=1:1440;
[sigma_,mu_] = gaussfit(x,y);
norm = normpdf(x,mu_,sigma_);
My problem is that the values in norm are way smaller than the values in y
, i.e. value in norm
are of the order of 10-3
while values in y are between 0 1
.
I have then to add an extra step in order to normalize between 0 and 1 the values in norm.
norm_data = (norm - min(norm)) / ( max(norm) - min(norm) );
Is my procedure correct? (estimation of sigma and mu, normpdf, normalization) Is there a way to get directly a fit to the original data expressing the probability?
y
can be downloaded here