-
Rotated histogram in Matlab
I wanted to draw some marginal histograms of a 2d distribution in Matlab. There is a function called scatterhist that does this but I couldn’t integrate it with the other subplots I wanted in this figure. Turns out a rotated histogram is as easy as changing the plot’s virtual camera position by setting the axis’
-
Taking the convolution of several images in one shot in Matlab
I wanted to take the convolution M different images (stored in an M x n x n) matrix with the same kernel in the Fourier domain, but I couldn’t figure out how to run fft2 on the second and third dimension of that matrix (computing a bunch of 2D FFTs in a single matlab call).
-
Obscure Matlab feature #0: Debug on error
If you have a long running function that you just wrote and need to debug, type this in the Matlab command window: dbstop if error This will cause the debugger to kick in as soon as a Matlab error is thrown, so you can trace the variables in your function which are erased from memory
-
Snow Dots project for psychophysics, neurophysiology in Matlab
There’s a new project for coordinating large scale psychophysics and neurophysiology in Matlab called Snow Dots. It uses PsychToolbox as a presentation layer and builds a framework around it to automate experimental flow, do GUIs, move data around, etc. It’s a little too Java-ish for my tastes (I’m a lightweight, convention over configuration kind of