MATLAB Answers

mutah
0

Help on gmdistributionfit toolbox

Asked by mutah
on 11 Nov 2013
Latest activity Commented on by mutah
on 13 Nov 2013
Hi when I plot
X=0.0001:0.03:3;
y = pdf(obj,X')
the x-axis from 0 to 100 but i put X 0:3 ??
what the problem ?

  0 Comments

Sign in to comment.

1 Answer

Answer by Jonathan LeSage on 11 Nov 2013

When you plot the gmdistribution fit results, did you remember to pass in both the x and y arguments to the plot function?
X = 0.0001:0.03:3;
y = pdf(obj,X');
% Plot both x,y
plot(X,y);
If you don't specify an x-vector, the plot function will just plot the y-values against their location in the y-vector (the indices).
Hope this helps!

  1 Comment

mutah
on 13 Nov 2013
thanks you alot

Sign in to comment.