%plotConcat.m

clear;

raw = '2016Jun17';

MAXi=5000;
path =    sprintf('../%s/raw',raw);
matfile = sprintf('../%s/parsed/CPF%s_ENG.mat',raw,raw);

load (matfile);

numprof = size(DATETIMENUM,1);


figure(1);  hold on;

% for i=1:1:numprof
%     for k=1:1:size(DATETIMENUM,2)
%         plot(DATETIMENUM(1,k),P(1,k),'.','MarkerFaceColor',state_color(STATE(1,k)))
%     end
% end

for i=1:1:numprof

  for (j = 1:1:size(DATETIMENUM,2))
      clr(j,:) = state_color(STATE(i,j));
      
      if(STATE(i,j)==3 || STATE(i,j) ==17)
          dat_size(i,j) = 50;
          
      else
          dat_size(i,j) = 10;
          %clr(j,:) = [1 1 1];
      end
      
  end
  
  for( j = 2:1:size(DATETIMENUM,2))
      if ( isnan(P(i,j)) )
          P(i,j)=P(i,j-1);
      end
  end
          
  
  %plot(DATETIMENUM(i,:),STATE(i,:));
  scatter(DATETIMENUM(i,:),P(i,:),dat_size(i,:),clr,'filled');

end