Skip to content
Snippets Groups Projects
Commit fc7e9967 authored by Mark Woolrich's avatar Mark Woolrich
Browse files

*** empty log message ***

parent bb71781a
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,10 @@ ReturnMatrix gammapdf(const RowVector& vals, const float mu, const float var)
return res;
}
float normpdf(const float val, const float mu, const float var)
{
return std::exp(-0.5*(std::pow(val-mu,2)/var))*std::pow(2*M_PI*var,-0.5);
}
ReturnMatrix normpdf(const RowVector& vals, const RowVector& mu, const RowVector& var)
{
......
......@@ -35,6 +35,7 @@ namespace MISCMATHS {
// returns nsamps*nparams matrix:
ReturnMatrix mvnrnd(const RowVector& mu, const SymmetricMatrix& covar, int nsamp = 1);
float normpdf(const float val, const float mu = 0, const float var = 1);
ReturnMatrix normpdf(const RowVector& vals, const float mu = 0, const float var = 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment