GIF Player
This function will display the animated GIF's in the figure window
Author: Vihang Patil

% It could also be done like
hObject = figure();
je = javax.swing.JEditorPane(...
'text/html',...
'<html><body><img src="file:loading.gif"></body></html>');
[~, hcontainer] = javacomponent(je, [], hObject);
set(hcontainer, 'units', 'pixels', 'position', ...
[10,10,37,37],'BackgroundColor',get(hObject,'Color'));

You forgot to state that it requeres the Statistics Toolbox due to the use of "combnk"

27 Mar 2012

Intersect2
Finds the intersection (common elements) of several (more than two) arrays
Author: Suri Like

Thanks..
but I would change the code a bit:

n = numel(cell);
if n == 2
result = intersect(cell{1}, cell{2});
elseif (n > 2 && rem(n,2) == 0)
for i = 1:(n/2)
intersections{1, i} = intersect(cell{i}, cell{n-i+1});
end
elseif (n > 2 && rem(n,2) == 1)
for i = 1:((n-1)/2)
intersections{1, i} = intersect(cell{i}, cell{n-i+1});
end
intersections{1, i+1} = cell{(n+1)/2};
else
error('You need at least two arrays as inputs');
end