Rank: 1307 based on 66 downloads (last 30 days) and 6 files submitted
photo

Peter Li

E-mail
Company/University
The Salk Institute

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Peter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Sep 2012 waitfordata Block Matlab while specified fig is open, then grab APPDATA when fig is closing. Author: Peter Li gui 2 0
08 Nov 2011 More intuitive subplot Matlab's subplot is useful for throwing figures together but the indexing is very counter-intuitive. Author: Peter Li plot, gui 1 2
29 Sep 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li random number, monte carlo, mersenne twister, boost, c, actors 2 3
25 Aug 2011 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li cpp, median, selection algorithm, c, selection, mex 26 14
  • 4.0
4.0 | 1 rating
18 Apr 2007 LSM File Toolbox Functions for reading info databases of Zeiss LSM confocal microscope files. Author: Peter Li data import, data export, lsm, zeiss, confocal, laser scanning 34 10
  • 4.5
4.5 | 7 ratings
Comments and Ratings by Peter View all
Updated File Comments Rating
01 Jul 2012 Matlab Icon for Linux (with Transparency) A nice icon to use as Matlab start button in Linux. Author: Georg Stillfried

Looks good, but would be nice to have in 256x256.

07 Dec 2011 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li

Hi jianbo, I think this is the same as Martijn's request? I may have time to give this a try in the next month or two. Unfortunately I expect it to be significantly slower than just returning the partially-sorted output. This is a limitation of the way the C++ standard library is written and I'm not sure I can get around it. Bruno's version may have more flexibility to be efficient here.

03 Oct 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li

It appears that the minimum spacing for Boost Random 1.47 uniform_01 distribution (doubles between 0 and 1) is ~2.3e-10, which indicates that the RNG is simply taking each int generated by the Twister and (effectively) dividing it by the maximum int.

Matlab's RNG appears to use two int from the Twister for each [0,1] double, using the first int for the more significant bits and the second for the less significant bits.

So essentially using this library will give you faster RNG over Matlab at the expense of lower resolution.

03 Oct 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li

I've noticed that the minimum spacing of random numbers generated by Boost Random 1.47 is greater than the minimum produced by Matlab; it appears to me that Matlab is using twice as many underlying integer seeds from the Twister to produce each double compared to Boost's behavior. So if you need very fine-grained doubles, this may be an issue for you.

29 Sep 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li

Please let me know if you are having trouble building; it's a little complicated if you don't have Boost 1.47, and then complicated again to get the multithreading working.

Comments and Ratings on Peter's Files View all
Updated File Comment by Comments Rating
27 Feb 2012 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li Klemm, Matthias

As a follow up on WurmD's comment: "all" Matlab functions work on the first dimension by default so I think a "replacement" method should do so too.
The current behavior of fast_median breaks things like:
med = median(data(:));

Currently I can't use fast_median in my code as I need to be able to change the filtering function and I don't want to code in some special treatment for fast_median... :/

Would that be possible?

07 Dec 2011 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li Li, Peter

Hi jianbo, I think this is the same as Martijn's request? I may have time to give this a try in the next month or two. Unfortunately I expect it to be significantly slower than just returning the partially-sorted output. This is a limitation of the way the C++ standard library is written and I'm not sure I can get around it. Bruno's version may have more flexibility to be efficient here.

05 Dec 2011 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li jianbo

Hi, I am interested to have index, rather of the n-th element output, thx.

22 Nov 2011 LSM File Toolbox Functions for reading info databases of Zeiss LSM confocal microscope files. Author: Peter Li Kristin

lsminfo worked out of the box for me. thanks!

03 Oct 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li Li, Peter

It appears that the minimum spacing for Boost Random 1.47 uniform_01 distribution (doubles between 0 and 1) is ~2.3e-10, which indicates that the RNG is simply taking each int generated by the Twister and (effectively) dividing it by the maximum int.

Matlab's RNG appears to use two int from the Twister for each [0,1] double, using the first int for the more significant bits and the second for the less significant bits.

So essentially using this library will give you faster RNG over Matlab at the expense of lower resolution.

Top Tags Applied by Peter
c, data export, data import, gui, io
Files Tagged by Peter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Sep 2012 waitfordata Block Matlab while specified fig is open, then grab APPDATA when fig is closing. Author: Peter Li gui 2 0
08 Nov 2011 More intuitive subplot Matlab's subplot is useful for throwing figures together but the indexing is very counter-intuitive. Author: Peter Li plot, gui 1 2
29 Sep 2011 Faster/parallel random number generator via standard C++ Mersenne Twister from Boost Random: same as modern Matlab, faster. Plus flexible distributions! Author: Peter Li random number, monte carlo, mersenne twister, boost, c, actors 2 3
25 Aug 2011 nth_element MEX wrap of C++ nth_element. Plus fast_median, a faster median function. Also can operate in-place. Author: Peter Li cpp, median, selection algorithm, c, selection, mex 26 14
  • 4.0
4.0 | 1 rating
22 Jun 2007 Add folders to path excluding .svn Changes to genpath to exclude the .svn to the path Author: H. Brian Hui addpath, genpath, svn 1 0

Contact us