title: gmdistribution for classification in Matlab
body: <p>Let's assume I have two gmdistibution models that i obtained using </p>
  
  <pre><code>modeldata1=gmdistribution.fit(data1,1);
  modeldata2=gmdistribution.fit(data2,1);
  </code></pre>
  
  <p>Now I have an unknown 'data' observation, and I want to see if it belongs to <code>data1</code> or <code>data2</code>.</p>
  
  <p>Based on my understanding of these functions, nlogn output using posterior,cluster, or pdf commands wouldn't be a good measure since I am comparing 'data' to two different distributions. </p>
  
  <p>What measure or output should I use find what is the <code>p(data|modeldata1) and p(data|modeldata2)</code> ?</p>
  
  <p>Many thanks, </p>