function [CM] = loadcm(subject, cmpath)
% loads the CM data from txt files prepared by Roger
%
%  [CM, SNR] = r_loadcm(subject)
%     CM = supposed to be 4 confusion matrices (16x17) in a cell array
%     subject - e.g. 'MJ-R-nalr'
subject='Alina';
nCM=4;

if nargin == 1
    %cmpath = 'cm_data_filter';  % path containing CM data
    cmpath = 'CM';
    %cmpath = 'cm_data_phases';
end


%subject = 'MJ-R'; 
load([cmpath, filesep, subject]);

%Creat Cells for Confusion Matrix
CM = cell(nCM, 1);
%Create Matrix for CM
matCM=zeros(15);

for r=2:16
    for c=2:16
        matCM(r-1,c-1)=str2double(prin1{r,c});
    end
end 
CM{1}=matCM;

for r=2:16
    for c=2:16
        matCM(r-1,c-1)=str2double(prin2{r,c});
    end
end 
CM{2}=matCM;

for r=2:16
    for c=2:16
        matCM(r-1,c-1)=str2double(prin3{r,c});
    end
end 
CM{3}=matCM;

for r=2:16
    for c=2:16
        matCM(r-1,c-1)=str2double(prin4{r,c});
    end
end 
CM{4}=matCM;

