For one dimensional data I am searching, the range search gives some results which are outside the specified range by a tiny bit. e.g. 4-5 orders of magnitude relative to the search window size.
example for reproducing this : (takes a few minutes to complete run)
I just managed to compile mex files for this submission on windows 64.
It wasn't that easy, and I wasted a few good hours on that, but it works now.
I also admit I know almost nothing about compiling and so forth so there might be better ways to do it, but anyway these were my steps:
1. Installed MS Visual Studio 2010 (warning: it's not free, but luckily my helpdesk had a licensed copy)
2. Opened Matlab, typed
>> mex -setup
and went through the setup process.
3. opened the options file:
(find the right location by typing
and added the folder P:\Documents\MATLAB\kdtree\src that contained the source files of kdtree to the options file (lines 25-26):
seems like if we don't do that, the compiler won't be able to find the kdtree.h file
4. from Matlab, typed:
>> cd 'P:\Documents\MATLAB\kdtree\src'
>> mex kdtree.cpp kdtree_create.cpp
>> mex kdtree_range.cpp kdtree.cpp
>> mex kdtree_closestpoint.cpp kdtree.cpp
5. That's it ! Now just copied the .mexw64 files to \kdtree\@kdtree folder.
The MPEG converter takes a MATLAB movie matrix and writes the movie to disk as an MPEG file.
Author: David Foti
To Dan Massie (03 Nov 2011) : the problem you noticed is due to the limitations of getframe command ( see http://www.mathworks.com/help/techdoc/ref/getframe.html ), and has nothing to do with mpgwrite.
Thanks for this useful code. I'm having a bit of bother trying to do something. I plot figure(1); I wish to inset a magnified portion of figure(1) (i.e. figure(2)) into figure(1) itself. Is this possible with your code?