1
votes

I have modeled my 1D data (1000*1 matrix) into 3 Gaussians, using

gmdistribution.fit(X,3) 

How can I plot something Like this?

It shows the probability of a given point belonging to each class.

enter image description here

1

1 Answers

0
votes

Write a function plotGaussian, which takes the mean, the variance, and a range of values. The function should generate the points to plot, and call the plot function. Then do hold on, and call plotGaussian 3 times.