function ShowCoefficients(X,boundaries_kk,boundaries2_pca,boundaries_kk_pca,V_U_pca,Vpca);
   
   k = length(boundaries_kk)-1;
   figure
   subplotnumber=1;
   subplot(4,1,subplotnumber); imagesc(-X(:,13:end)), colormap(gray), 
   title('Original data')
   for alg=1:3
      subplotnumber = subplotnumber+1;
      for j=1:k
	 if alg==1; 
	    boundaries=boundaries_kk; 
	    Vhat=V_U_pca;
	    titlestring = 'Algorithm SEG-PCA';
	 elseif alg==2, 
	    boundaries=boundaries2_pca; 
	    Vhat=V_U_pca;
	    titlestring = 'Algorithm SEG-PCA-DP';
	 elseif alg==3 
	    boundaries=boundaries_kk_pca; 
	    Vhat=Vpca; 
	    titlestring = 'Algorithm PCA-SEG';
	 end
	 X_ = X(:,[boundaries(j):boundaries(j+1)-1]);
	 a_ = pinv(Vhat)*representative(X_,2);
	 Xhat(:,[boundaries(j):boundaries(j+1)-1])=Vhat*a_*ones(1,size(X_,2));
	 A_(:,[boundaries(j):boundaries(j+1)-1])=a_*ones(1,size(X_,2));
      end;
      subplot(4,1,subplotnumber), imagesc(-A_(:,13:end)), colormap(gray);
      title(titlestring);
   end
   subplot(4,1,4),xlabel('Segment-wise coefficients a')
   for subplotnumber=1:3
      subplot(4,1,subplotnumber);set(gca,'XTickLabel','');
   end
