covartech / PRT

Pattern Recognition Toolbox for MATLAB
http://covartech.github.io/
MIT License
145 stars 70 forks source link

Undefined function 'subDir' for input arguments of type 'char' #31

Closed lyzhangjm closed 9 years ago

lyzhangjm commented 9 years ago

Hi, when I run torrione_ExampleCoatesNg_Kmeans_Mscorid, The error information is:

Undefined function 'subDir' for input arguments of type 'char'. Error in prtDataGenMsrcorid (line 103) fList = subDir(cDir,'*.jpg'); Error in torrione_ExampleCoatesNg_Kmeans_Mscorid (line 48) ds = prtDataGenMsrcorid;

My matlab version is 2012a. I don't konw why. Thank you。

kennethmorton commented 9 years ago

Hi Sorry about this. As a quick fix, please change that to call prtUtilSubDir() instead.

fList = prtUtilSubDir(cDir,'*.jpg');

We will push the changes to the repository soon.

Kenny

lyzhangjm commented 9 years ago

thank you, but there are error when using prtUtilSubDir: No appropriate method, property, or field addParameter for class inputParser. Error in prtUtilSubDir (line 46) p.addParameter('dirMatch',''); Error in prtDataGenMsrcorid (line 104) fList = prtUtilSubDir(cDir,'.jpg'); Error in torrione_ExampleCoatesNg_Kmeans_Mscorid (line 48) ds = prtDataGenMsrcorid;

peterTorrione commented 9 years ago

Hi,

This is a MATLAB version issue - unfortunately they changed the calling syntax for inputParser in a recent version of MATLAB.

Can you either:

1) Update your MATLAB to 2014

or

2) Replace any calls to addParameter with addParamValue... sorry for the confusion...

Thanks! -Pete