Integrating C++ Code in MATLAB
Mostra commenti meno recenti
How can I integrate C++ in Matlab?
Let's say, I wanna run the example "fdbscan_example.m" in Matlab. But, I need to Call the functions kdtree_build.m and kdtree_ball_query.m from the kd-trees (written in C++ language). How can i do that?

3 Commenti
Walter Roberson
il 22 Ott 2018
DBSCAN/kdtree-master/toolbox/kdtree_build.cpp needs DBSCAN/kdtree-master/toolbox/KDTree.h which needs DBSCAN/kdtree-master/toolbox/MyHeaps.h . That .h attempts to use std::__is_heap but that is not defined . std::__is_heap only exists if you use stl_heap.h but the code does not do that.
ha ha
il 22 Ott 2018
rolf harkes
il 21 Dic 2018
Modificato: rolf harkes
il 21 Dic 2018
The error message explains that it cannot find kdtree_build.cpp.
This file is in \kdtree-master\toolbox. So is the file kdtree_compile.m. If you run that it will compile everything. But compiling is probably not needed. If you look in that folder it already contains the compiled kdtree_build.mexw64.
The problem with the code in your screenshot is most likely that line 14 cannot execute since fdbscan cannot locate kdtree_build. Very similar to why it cannot compile. You must include that path using addpath('\kdtree-master\toolbox').
@Walter Robertson: The code from https://github.com/ataiya/kdtree/ compiles just fine on my system. No problems with heaps.
Risposte (0)
Categorie
Scopri di più su COM Component Integration in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!