Code covered by the BSD License  

Highlights from
interweave

from interweave by John T. McCarthy
This function interweaves (alternates/overlaps) the columns of equal-sized matrices A,B,C...

interweave(A, varargin)
function output = interweave(A, varargin)

% This function interweaves (alternates) the columns 
% of equal-sized matrices A,B,C...
%
% The first column of the output is the first column of A.
% The second column of the output is the first column of B,
% followed by C etc.
% Then the second columns of A,B,C...
% The final column of the output is the final column of the 
% last input matrix.
%
% Usage: output = interweave(A,B,C...)
%
% Example: A = ones(3); B = ones(3)*2; C = ones(3)*3; 
%          output = interweave(A,B,C)

input = [A cell2mat(varargin)];
n = size(A,2); N = size(input,2); 

for i = 1:nargin
    output(:,i:nargin:N) = input(:,n*(i-1)+1:n*i);
end

Contact us at files@mathworks.com