Clear Filters
Clear Filters

I want to generate random point on a bivariate gausian distribution. This would be easy if the PDF is not angled, but it is rotated round the Z-axis.

1 view (last 30 days)
Hi, I want to generate random points on a bivariate gausian distribution. This would be easy if the PDF was not rotated. But it is rotated round the Z axis ( probability axis). The expression for the distribution i have is of the general form : P = Amp*exp( - (a*(X-Mux).^2 + 2*b*(X-Mux).*(Y-Muy) + c*(Y-Muy).^2)) Where a = cos(theta)^2/(2*sigma_x^2) + sin(theta)^2/(2*sigma_y^2) b = -sin(2*theta)/(4*sigma_x^2) + sin(2*theta)/(4*sigma_y^2) c = sin(theta)^2/(2*sigma_x^2) + cos(theta)^2/(2*sigma_y^2) and theta is the angle of the distribution round the Z axis. Is there a command in matlab that can do this Or should i try to generate the points without the angle and try to rotate the generated points afterwards. Thanks in advance (the goal is to do recursive Bayesian filtering to find an object at the location described by the PDF)
  4 Comments
Torsten
Torsten on 2 Oct 2017
Edited: Torsten on 2 Oct 2017
But then
Sigma^(-1) = [2*a 2*b;2*b 2*c]
mu = [Mux Muy]
and you can use "mvnrnd", don't you ?
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!