MATLAB Generate 3 dimensional dataset that include 4 normal pdfs of 4 classes
<p>How is possible to generate 3 dimensional dataset that include 4 normal pdfs of 4 classes? I'm using matlab, but i don't know how is possible to build datasets with this features </p>

<p>I can choice means and covariance matrix...
Now I know to solve this simple problem:</p>

<pre><code>%mean
m1=[-3 2]';

%covariance matrix
S1=[1 0; 0 1];

N=500;

%to classify    
x1=[-2 2]';

X1 =mvnrnd(m1,S1,N)';

p11 = comp_gauss_dens_val(m1,S1,x1);


figure(1), plot(X1(1,:),X1(2,:),'r.');
figure(1), axis equal
figure(1), axis([-8 8 -8 8])

hold on

plot(x1(1),x1(2),'O');
</code></pre>

<p>comp_gauss_dens_val returns the value of the gaussian distribution at x.</p>

<p>Now p11 has the value of gaussian distribution in that point.</p>

<p>My problem is to extend this solution at the problem: "generate 3 dimensional dataset that include 4 normal pdfs of 4 classes and then classify some random points"</p>