triple integral of multivariate gaussian pdf
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yi Zhou
el 29 de Abr. de 2016
Respondida: Yi Zhou
el 1 de Mayo de 2016
I want to integrate a function that includes joint gaussian pdf over different intervals, and I first try a simpler case as follows
sigma = [1 0 0; 0 1 0; 0 0 1]; % Cov matrix
theta = 0.001;
F = @(t, m, n) (t^2) * (det(sigma)*(2*pi)^3)^(-0.5) * exp(-0.5*transpose([t; n; m]) * inv(sigma) * [t; n; m]); % objective func
integ = integral3(@(t, m, n) arrayfun(F, t, m, n), -100, 100, -100, 100, -10, 10)/theta^2;
I can get a result of 1.8e-12. However, my goal is to integrate variable n over the interval [-theta*|m|, theta*|m|], so I did the following
sigma = [1 0 0; 0 1 0; 0 0 1]; % Cov matrix
theta = 0.001;
F = @(t, m, n) (t^2) * (det(sigma)*(2*pi)^3)^(-0.5) * exp(-0.5*transpose([t; n; m]) * inv(sigma) * [t; n; m]); % objective func
low = @(m) -theta * abs(m); %lower limit
high = @(m) theta * abs(m); %higher limit
integ = integral3(@(t, m, n) arrayfun(F, t, m, n), -100, 100, -100, 100, low, high)/theta^2;
and matlab says that
Error using @(m)-theta*abs(m) Too many input arguments.
How can I modify the code to integrate over such a coupled interval?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!