
function [M] = toMatrix( vector, sideSize )

%TOMATRIX	Wrap (convert) vector into a square matrix.
%	[M] = TOMATRIX( vector, size )  returns a square 
%	of side size defined by 'size'; filled with the 
%	elements provided by 'vector', in top to bottom
%	and left to right order. 
%
%	See also TOVECTOR.


M = zeros( sideSize );
M(:) = vector(:);
M = M';

   
   