Showing posts in category Matlab. Show all posts

Rebinning discrete data into a smaller number of bins

September 12, 2013 at 03:20 PM | categories: Code, Algorithms, Matlab | View Comments

The previous post on quantization dealt with binning a continuous variable into a small number of discrete categories. But sometimes the source data is already discrete, for example when the data are counts (e.g. counts of spikes emitted by a neuron within a certain time window). Sometimes the raw...

Saving structures quickly with serialization

June 18, 2013 at 02:38 PM | categories: Code, Matlab | View Comments

In an earlier post I showed how to improve performance when saving large numerical arrays. However, often when working with FieldTrip, which uses complex nested structures and cell arrays to represent data, it is not easy to convert these structures into contiguous arrays. This very detailed post on the UndocumentedMatlab...

Fitting multivariate t-distributions to data

April 18, 2013 at 04:39 PM | categories: Code, Algorithms, Matlab | View Comments

I found that some of the MEG data I am working with has long tails which was causing some problems when using non-robust statistics that assume normality. Visual inspection showed a t-distribution might be a good fit: The figures show the histogram of the data, together with the...

Saving large files efficiently in Matlab

March 21, 2013 at 12:53 PM | categories: Code, Matlab | View Comments

You might have thought functionality as basic as saving numerical data to a file would be something you wouldn't have to worry too much about with a product as mature as MATLAB... You'd be wrong! The standard MATLAB file formats have evolved a bit over the years. Here are...

Sharedmatrix with Parallel Computing Toolbox

March 13, 2013 at 12:58 PM | categories: Code, Matlab | View Comments

The sharedmatrix package allows the sharing of memory between Matlab sessions. It uses operating system shared memory and implements a proxy interface which allows you to use objects in this shared memory as if they were normal Matlab variables. This is very useful, for example when using the Parallel Computing...
Next Page ยป