title: Measuring density for three dimensional data (in Matlab)
body: <p>I have a dataset consisting of a large collection of points in three dimensional euclidian space. In this collection of points, i am trying to find the point that is nearest to the area with the highest density of points.</p>
  
  <p>So my problem consists of two steps:</p>
  
  <ul>
  <li><p>1: <em>Determine where density of the distribution of points is at its highest</em></p></li>
  <li><p>2: <em>Determine which point is nearest to the point found in 1</em></p></li>
  </ul>
  
  <p>Point 2 i can manage, but i'm not sure how to solve point 1. I know there are a lot of functions for density estimation in Matlab, but i'm not sure which one would be the most suitable, or straightforward to use.</p>
  
  <p>Does anyone know?</p>
  
  <hr>
  
  <p><em>My command of statistics is a little bit rusty, but as far as i can tell, this type of problem calls for multivariate analysis. Someone suggested i use multivariate kernel density estimation, but i'm not really sure if that's the best solution.</em></p>