Azzera filtri
Azzera filtri

Need help finding the std of half a normal distribution

8 visualizzazioni (ultimi 30 giorni)
Hi! I have trouble getting the std of the left side of my plot:
This is the result of plotting my row vector of values.
First thing I tried was getting rid of the values after the peak, mirroring the plot, and using histfit with the half normal distribution fit option to get the std. This resulted in an std far below 1:
Using this:
pd = fitdist(equation(:),'hn');
Gave me a sigma of 0.0021. This is obviously not right.
Then I tried using horzcat() to get a normal distribution from the first plot and the mirror together:
I used the std() function, histfit() with 'normal', and I used a formula for the weighted std.
Nothing comes close to the value that it should be, around 40.
Help would be appreciated!!

Risposte (1)

Benjamin Thompson
Benjamin Thompson il 31 Gen 2022
The std function is intended to calculate the standard deviation of a sample of data. It is not intended to estimate parameters of a curve. If your function is actually a probability density function and you are looking to fit a half gaussian PDF to part of that PDF, you might want to use the curve fit tool to estimate the best parameters.
The general Gaussian curve is described at Wikipedia in this article:

Community Treasure Hunt

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

Start Hunting!

Translated by