"Fabio " <firstname.lastname@example.org> wrote in message news:email@example.com... > 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.
Which version of MATLAB and Statistics Toolbox are you using?
What do you see when you type:
which -all gmdistribution
which -all fit
I want to make sure that there's no other gmdistribution class that's taking precedence over the one included in Statistics Toolbox.
>>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
This is not the display I expected, which makes me even more suspicious that you have a gmdistribution function that's taking precedence over the Statistics Toolbox one or have modified the gmdistribution files in the Toolbox or that your installation of Statistics Toolbox is incomplete or corrupted.