1

我正在尝试使用http://www.cmap.polytechnique.fr/~aspremon/ZIP/COVSEL.zip上提供的这个软件。它们具有在 matlab 文件 spmlcdvec.m 中定义的函数 spmlcdvec。它进一步调用了一个函数 BoxQP,他们为此提供了一个名为 BoxQP.mexmac 的二进制 mex 文件。但是,当我运行函数 spmlcdvec 它说

Undefined function 'BoxQP' for input arguments of type 'double'.

我应该怎么办?怎么了?

4

1 回答 1

3

Run mexext in your command window. If it does not return mexmac (or mexw32 which is also present in the folder) then you you won't be able to run the BoxQP function. These are simply old files - I see that they're from 2006. If you're using any form of OS X these days you'll get mexmaci64, which is not compatible. However, it looks like they have helpfully included all of the source code so you'll be able to hopefully compile the binaries for your system. For details on compiling mex code see this.

Then, as @alrikai suggests, your BoxQP function needs to be on your path. Either make sure that you call your code from the same folder or run path from the command window and check if that directory has been properly added (if you did so). See also addpath.

于 2013-06-04T23:31:47.723 回答