image_file = 'einstein1.jpg';
x = imread(image_file);
imagesc(x); axis image; colormap gray;
x2 = x(1:2:end,1:2:end);
x4 = x(1:4:end,1:4:end);
x8 = x(1:8:end,1:8:end);
[r,c]=size(x);
[r2,c2]=size(x2);
[r4,c4]=size(x4);
[r8,c8]=size(x8);
y = zeros(r,c+c2+c4+c8);
i=0;
j=0;
y(i+[1:r],j+[1:c]) = x;
j = j + c;
y(i+[1:r2],j+[1:c2]) = x2;
j = j + c2;
y(i+[1:r4],j+[1:c4]) = x4;
j = j + c4;
y(i+[1:r8],j+[1:c8]) = x8;
imagesc(y); axis image;

