
evec_stack = reshape(evecs,height,width,frames);

figure;

%Eigenvector 5
subplot(6,4,1);
imagesc(evec_stack(:,:,5));
axis image; axis off;
title('Spatial Mode 5');

%Coefficient 5
subplot(6,4,2:3);
plot(coeffs(:,5));
title('Coefficient 5');

subplot(6,4,4);
hist(coeffs(:,5),100);


%Eigenvector 6
subplot(6,4,5);
colormap(gray);
imagesc(evec_stack(:,:,6));
axis image; axis off;
title('Spatial Mode 6');

%Coefficient 6
subplot(6,4,6:7);
plot(coeffs(:,6));
title('Coefficient 6');

subplot(6,4,8);
hist(coeffs(:,6),100);


%Eigenvector 7
subplot(6,4,9);
imagesc(evec_stack(:,:,7));
axis image; axis off;
title('Spatial Mode 7');

%Coefficient 7
subplot(6,4,10:11);
plot(coeffs(:,7));
title('Coefficient 7');

subplot(6,4,12);
hist(coeffs(:,7),100);


%Eigenvector 8
subplot(6,4,13);
imagesc(evec_stack(:,:,8));
axis image; axis off;
title('Spatial Mode 8');

%Coefficient 8
subplot(6,4,14:15);
plot(coeffs(:,8));
title('Coefficient 8');

subplot(6,4,16);
hist(coeffs(:,8),100);


%Eigenvector 9
subplot(6,4,17);
imagesc(evec_stack(:,:,9));
axis image; axis off;
title('Spatial Mode 9');

%Coefficient 9
subplot(6,4,18:19);
plot(coeffs(:,9));
title('Coefficient 9');

subplot(6,4,20);
hist(coeffs(:,9),100);


%Eigenvector 10
subplot(6,4,21);
imagesc(evec_stack(:,:,10));
axis image; axis off;
title('Spatial Mode 10');

%Coefficient 10
subplot(6,4,22:23);
plot(coeffs(:,10));
title('Coefficient 10');

subplot(6,4,24);
hist(coeffs(:,10),100);


clear pic evec_stack
