Date: Jul 9, 2013 6:29 AM
Author: Fabio
Subject: gmdistribution.fit ERROR: Method 'fit' is not defined for class 'gmdistribution' or is removed from MATLAB's search path

Hi, 
I have to use a specific program that contains those rows:

>S = struct('mu',mu,'Sigma',sigma,'PComponents',p);
>options = statset('Display','final','MaxIter', 9000);
>object =gmdistribution.fit(X,NGauss,'Options', options,'Start',S);


but when I launch the program it returns this error:

>Error using gmdistribution.fit
>Method 'fit' is not defined for class 'gmdistribution' or is removed from MATLAB's search path.


>Error in val (line 149)
>object =gmdistribution.fit(X,NGauss,'Options', options,'Start',S);


Into the folder "toolbox/stats/stas" there is the "@gmdistribution" directory, but if I try to create a new path it returns:

>you cannot add method folders(ones that starts with '@'). or private folders to your Matlab search path.

Moreover if i type "gmdistribution" on the command window it returns:

>> gmdistribution

ans =

gmdistribution

Properties:
NDimensions: 0
DistName: 'gaussian mixture distribution'
NComponents: 0
PComponents: [0x1 double]
mu: []
Sigma: []
NlogL: []
AIC: []
BIC: []
Converged: []
Iters: []
SharedCov: []
CovType: []
RegV: 0

Methods

Methods for class gmdistribution:
gmdistribution
Static methods:
fit


but if i type "gmdistribution.fit" it returns:

>> gmdistribution.fit
>Error using gmdistribution.fit
>Method 'fit' is not defined for class 'gmdistribution' or is removed from MATLAB's search path.


Can someone help me? I don't really know why it doesn't work.
Thank you.

Fabio