clc
clear all
close all
load GMM
load TESTLPC
s=[];
for i=1:1:3
    s=[s size(TESTLPC{i},1)];
end
DATA=[];
for i=1:1:3
    DATA=[DATA TESTLPC{i}(1:1:mx,:)];
end
DATA1=[];
for i=1:1:size(DATA,2)
    temp=DATA(:,i);
DATA1=[DATA1 reshape(temp,13,14)];
end
DATA1=E'*DATA1;
%Generating probability of the first word
S=5;
F=14;
COL=[];
for x=1:1:15
prob=[];    
DATA=DATA1(:,(x-1)*F+1:1:(x-1)*F+F);
for y=1:1:3    
prob=[prob genprob(S,F,DATA,GMMMODEL{y})];
end
%prob=prob/sum(prob);
[P,Q]=max(prob);
GP{x}=prob;
COL=[COL Q];
end

