misc/
ajs_gaussnd.pro
topajs_gaussnd
result = ajs_gaussnd(x [, params] [, amp=amp] [, mean=mean] [, cov=cov])
This function returns the probability density at a given point _x_ for a multivariate normal distribution with specified mean, covariance matrix and amplitude.
Compatible with mpfit
Return value
[N] probability density of specified normal distribution at _x_
Parameters
- x in required
[n,N] Array of n-dimensional input values
- params in optional
[1 + n + (n*(n+1))/2] = [amp,mean,cov]
WHERE amp amplitude (scalar)
mean [n] Mean of each dimension
cov [(n*(n+1))/2] Unique components of symmetric covariance matrix, e.g., 00, 01, 02, 11, 12, 22 for 3-d
Keywords
- amp in optional
amplitude (optional; default=1)
- mean in optional
[n] Mean of each dimension
- cov in optional
[n,n] Covariance matrix
Examples
Identical result:
y=ajs_gaussnd([1,2,3],mean=[0,0,0],cov=[[1,0,0],[0,1,0],[0,0,1]])
y=ajs_gaussnd([1,2,3],amp=1,mean=[0,0,0],cov=[[1,0,0],[0,1,0],[0,0,1]])
y=ajs_gaussnd([1,2,3],[1,0,0,0,1,0,0,1,0,1])
Author information
History: |
7 Sep 2007: Created, Anthony Smith |
File attributes
Modifcation date: | Fri Jun 6 08:19:26 2008 |
Lines: | 71 |
Docformat: | rst rst |