%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Module II: Partitioning
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOTE: to see results in the Command Window, 
% simply delete the ";" at the end of a given command.

X=magic(6); % a quick way to generate a practice matrix. 

% by columns:
c1=X(:,1);
c2=X(:,2);
c3=X(:,3);
c4=X(:,4);
c5=X(:,5);
c6=X(:,6);

test=[c1 c2 c3 c4 c5 c6];

% by rows: (recall the confusing convention...)
x1=X(1,:)';
x2=X(2,:)';
x3=X(3,:)';
x4=X(4,:)';
x5=X(5,:)';
x6=X(6,:)';

test=[x1';x2';x3';x4';x5';x6'];

% other example:

X11=X(1:4,1:4);
X12=X(1:4,5:end);
X21=X(5:end,1:4);
X22=X(5:end,5:end);

test=[X11 X12;X21 X22];




