Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: ksdensity function  error Undefined variable "internal" or class "internal.stats.parseArgs"
Posted:
Apr 18, 2013 2:41 PM


> I am currently facing some issues when I upgraded from Matlab7 to Matlab12 > on my Win7 laptop. Problem#1: I seem to be missing the ksdensity function > (part of stats toolbox). Ignoring problem#1, to quickly solve it, I copied > the ksdensity.m file from my LINUX version and added it to my Win7.
Best not to ignore problem #1. I'm not sure what happened but perhaps you can find this file. Maybe your path is not correct. I'd expect you'd find it in either of these two places:
>> cd(matlabroot) >> ls toolbox/stats/ksdensity.m % it was here in some >> releases 'toolbox\stats\ksdensity.m' not found. >> ls toolbox/stats/stats/ksdensity.m % it moved here at some >> point ksdensity.m
> Problem#2: When running a code that used to work on Matlab7, Matlab12 gave > me an error for the ksdensity function (see below) >  > Undefined variable "internal" or class "internal.stats.parseArgs".
The ksdensity function uses some internal utilities. If you copy it to an older release that doesn't have those utilities, you could encounter a problem. Here's what is missing for you:
>> which internal.stats.parseArgs ... \toolbox\stats\stats\+internal\+stats\parseArgs.m % static method or package function
One thing to try is "rehash toolbox" to make sure MATLAB notices what files you have added to or removed from toolbox directories. But I also am confused  MATLAB12 sounds like a very old thing, unless you mean R2012a or R2012b.
 Tom



