function [cba]=colblock(a,m,n)
%------------------------------------------------------------------------------
% Usage: [cba]=colblock(a,m,n) - Column block form of 'a'
%------------------------------------------------------------------------------
% a: (m x n) block matrix, all the blocks should have the same dimension r x t
% cba: (m*n*r x t) matrix 
%------------------------------------------------------------------------------
% Juan Carlos Gomez - 12/10/2001.
%------------------------------------------------------------------------------
[ma,na]=size(a);
r=ma/m;
t=na/n;
cba=[];
for j=1:n,
  cba=[cba;a(:,t*(j-1)+1:t*(j-1)+t)];
end;  
    
