KED Toolbox for Matlab 使用

原始的程序页面 https://www.ics.uci.edu/~ihler/code/kde.html

但这个code的维护在2007年就停止了。
如果你还是想用这个,以下内容供参考

使用KED Toolbox

  1. Download and unzip the KDE class to a directory called <tt>@kde</tt>.

  2. (通常都需要先做Compile) Compile the MEX functions.

  • This can be done by going to the “@kde/mex” directory in Matlab, and copying and pasting the code from the makemex.mfile into the Matlab window.
  • If this fails, make sure that MEX / C++ compilation works. The KDE toolbox is tested in Matlab R13 and later; it may work in ealier versions as well.
  • Re-compiling may not be required, depending on your platform and version; “mexglx” (Linux 32-bit), “mexa64” (Linux 64-bit), and “dll” (Windows 32-bit) files are included. If you have trouble, recompile.

Thanks to Ankur Datta for compiling Mac versions of the MEX files and making them available. (I do not even own a Mac and cannot vouch for their operation, etc.; use at your own risk.)

NOTE: MS Visual C++ has a bug in dealing with “static const” variables; I think there is a patch available, or you can change these to #defines.

Operate from the class’ parent directory, or add it to your MATLAB path (e.g. if you unzip to “myhome/@kde”, cd in matlab to the “myhome” dir, or add it to the path.)

一个新的toolbox

对上述code在2014R中compile时的bug做了处理,推荐使用
https://github.com/devkicks/KDEMaltab

The repositories contain code from [Kernel Density Estimation Toolbox for Matlab (R13)] http://www.ics.uci.edu/~ihler/code/kde.html

A number of bugs related to compiling the code on Windows with Matlab 2014b and Visual Studio 2010 have been fixed in this repo as well as the mex files have been pre-compiled for Matlab 2014b and Visual Studio 2010 on Windows 7.

This fix include:

  • Static Type casting of double to enum
  • Fix for ambigous function calls for: log and pow functions in C++
  • clearing warning related to automatic conversion of int to unsigned int
    原文作者:李彪_哈工大
    原文地址: https://www.jianshu.com/p/c96a2d670d6e
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞