0
votes

The weirdest thing happened, it seems as Matlab corrplot function just stopped working. I have a piece of code which always worked perfectly fine. Now the same code is throwing an error. When I try

corrplot(CE,'varNames',{'Diam.','Depth','Rad.','Thick','Thin'})

I get:

Undefined function 'corrplot' for input arguments of type 'cell'.

1
Did you accidentally define a new function also called corrplot? what does which corrplot output? Does this problem persist on a fresh instance of MATLAB where aside from manually assigning data to CE, that is the only line of code you run? - Dan

1 Answers

1
votes

The function is not deprecated, meaning that probably your Econometrics Toolbox is no longer available. You can check for the available toolboxes in your MATLAB license by running ver. Additionally you should run

which corrplot
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\econ\econ\corrplot.m

To show you whether it is around somewhere. I reckon something went wrong with the toolbox installation, so you should check whether you still have a valid license and, if so, reinstal the toolbox.

You might also have a variable called corrplot (which corrplot tells you whether that is the case) although in my case the error then is:

CE = [1:10].';
corrplot=1;
corrplot(CE,'varNames',{'Diam.','Depth','Rad.','Thick','Thin'})
Error using subsindex
Function 'subsindex' is not defined for values of class 'cell'.

which corrplot
corrplot is a variable. % Not good, you didn't want that.

Clear the variable with clear corrplot and check where in your code it creates this variable and rename it.