title: How to estimate multi-dimensional probability distribution from data using Matlab?
body: <p>Hi I'm trying to estimate the data distribution using Matlab.</p>
  
  <p>For one dimensional data, I can definitely use <code>ksdensity</code>.</p>
  
  <p>However my problems is that I need multi-dimensional joint distribution and conditional distribution.</p>
  
  <p>I've tried <a href="http://www.ics.uci.edu/~ihler/code/kde.html" rel="nofollow noreferrer">kde tools</a> from UCI. It is not functioning in my case and I cannot figure out why. So I'm asking for another tool I can possibly use..</p>
  
  <h2>Edit</h2>
  
  <p>The toolbox is not working and giving extreme results. I used 1e5 points and it might because the points are too dense.</p>
  
  <p>KDE toolbox result</p>
  
  <p><img src="https://i.stack.imgur.com/eclvM.jpg" alt="KDE toolbox"></p>
  
  <p><code>ksdensity</code> result</p>
  
  <p><img src="https://i.stack.imgur.com/iCj5G.jpg" alt="enter image description here"></p>