% Compare two matrices

for idx=1:size(TH_STATES,1),
    if TH_STATES(idx,2)~=TH_STATES1(idx,2),
        fprintf(1,'Index %d PACEMAKER state prob %d state %d\n',idx,TH_STATES(idx,2),TH_STATES1(idx,2));
        fprintf(1,'Index %d HEART state prob %d state %d\n',idx,TH_STATES(idx,1),TH_STATES1(idx,1));
        break;
    end
end