Category: Matlab examples
-
Removing line noise from LFPs, wideband signals
…Trail of papers had a recent post on standard analyses in neuroscience, which reminded me that I’ve meaning to post about signal preprocessing for a while now. If there’s too much line noise (electrical noise at multiples of 60Hz in North America and 50Hz in Europe) in a signal, this will render the signal unusable.…
-
Don’t save anonymous Matlab functions
Bug of the day: if you use the save function inside a function, and one of the things you’re saving is an anonymous function, then all the variables in the scope of the (non-anonymous) function will be saved along in the .mat file. So for example: If you look at test.mat you will find that…
-
Video super-resolution coming to consumer software
Video super-resolution is a technique to increase the resolution of a movie by exploiting the redundancy between frames. It’s easiest to understand the technique by first thinking of the corresponding technology in images. It’s possible to increase the effective resolution of an image by taking multiple pictures, each offset by a fraction of a pixel,…
-
Computational models of vision: reading list and code
Geoff Boynton has a nice webpage for a Special Topics in Vision class he gave a few years ago. The class website includes a linked list of influential papers on vision, with an emphasis on papers with a strong computational component. Also available is a zip file with a large number of matlab functions demonstrating…
-
The joy of object-oriented programming in Matlab
Matlab has had support for full object oriented programming (OOP) since 2008a. Those with an OOP background (say, in Java, C# or Python) will find Matlab’s OOP features to be fairly complete. These include: Pass-by-reference semantics via subclassing the handle class Instance methods and static methods Full selection of access control for methods, properties (public,…
-
Gibbs sampler in Matlab using mexme
Darren Wilkinson has a nice post up comparing different programming languages (C, Java, scala, Python, and R) for writing Gibbs samplers. Unsurprisingly, C is fastest, although it is certainly not the easiest language to program in. In particular, I/O is a bitch. Others have suggested an interesting solution: write the core of the Gibbs sampler…