For those who can't run the demo file because of 'undefined function' error. You need to:
1) Run this command: list = dir('*.cpp');
to get the list of files.
2) For all the files in list, change log(2) to log(2.0). You can get all the files' names by:
2) Run 'makeosmex.m'
Now this should works like a dream.