Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

chi2inv in R2008b

43 views
Skip to first unread message

Abdul Rauf Anwar

unread,
Oct 12, 2010, 11:55:05 AM10/12/10
to
Hi this is rather a strange problem
as per MATLAB documentation on this page
http://www.mathworks.com/help/toolbox/stats/chi2inv.html
this example should work

x = chi2inv(0.95,10)
x =
18.3070

I used to work for me but it doesnt work on my new pc which has MATLAB R2008b
when i tried to make function chi11.m and analzye the problem it prompted as

>> x = chi2inv(0.95,10)
??? Undefined function or method 'chi2inv' for input arguments of type 'double'.

>> x = chi11(0.95,10)
??? Undefined function or method 'distchck' for input arguments of type 'double'.

can someone help me with this ?

Regards

Wayne King

unread,
Oct 12, 2010, 12:33:04 PM10/12/10
to
"Abdul Rauf Anwar" <rauf...@gmail.com> wrote in message <i920cp$1lj$1...@fred.mathworks.com>...

Hi Abdul, Are you sure you have the Statistics Toolbox installed on your new PC?

Wayne

Abdul Rauf Anwar

unread,
Oct 12, 2010, 12:43:04 PM10/12/10
to
Yes i checked that by 'ver'
and i can see statistics toolbox , version 7.0
:(
"Wayne King" <wmki...@gmail.com> wrote in message <i922k0$p7o$1...@fred.mathworks.com>...

Wayne King

unread,
Oct 12, 2010, 12:51:04 PM10/12/10
to
"Abdul Rauf Anwar" <rauf...@gmail.com> wrote in message <i9236o$3oa$1...@fred.mathworks.com>...

Does the following command return a 1 for you:

license('test','statistics_toolbox')

Wayne

Balint

unread,
Nov 5, 2010, 2:32:03 PM11/5/10
to
> > > > ??? Undefined function or method 'distchck' for input arguments of type 'double'.
> > > >
> > > > can someone help me with this ?
> > > >
> > > > Regards
> > >
> > > Hi Abdul, Are you sure you have the Statistics Toolbox installed on your new PC?
> > >
> > > Wayne
>
> Does the following command return a 1 for you:
>
> license('test','statistics_toolbox')
>
> Wayne

I have got the same problem!
license('test','statistics_toolbox') = 1 for me and I also tried to uninstall and reinstall Matlab, of course with statistic toolbox marked for installation. But nothing I did helped. The funny thing is, that not even the help contains any info about the missing statistic functions, so I guess it is not installed? But how to verify that, and more importantly, how to install it??

Thanks alot for your time!

Balint

unread,
Nov 6, 2010, 12:32:03 PM11/6/10
to
Found the solution, but this really has to be considered a bug in my opinion: if you keep the old "pathdef.m" file in the "My Documents\MATLAB" folder (which MATLAB does not delete on uninstalling), it will be used with a new version (if you install a new MATLAB). Now the problem is that with new versions, the toolbox paths might change, but the path definitions are NOT being updated - if you have that old "pathdef.m" file, it will be used by the new MATLAB too.
To make things worse, there is possibly no error or warning at all, because the wrong old path in the new version might still exist, it just does not contain what it should anymore. Really nasty to figure out...

In the case of the statistics toolbox the old path for me was "matlabroot,'\toolbox\stats;'" while the correct new path would have been "matlabroot,'\toolbox\stats\stats;'".
So the trick is to change that in "pathdef.m" and to do a "rehash toolboxcache" command and then restart MATLAB. Problem solved.

0 new messages