Skip to content

Commit

Permalink
MinorFix
Browse files Browse the repository at this point in the history
  • Loading branch information
plaurent91 committed Oct 8, 2013
1 parent a5a1e83 commit eba8314
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Assignment5/randExample.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function randExample (trainingSet, characterToPlot)

%Input:
%HMMs that you can find using the TrainClassifiers function
%trainingSet that you can find using the TrainClassifiersPierre function.
%Structure containing the HMMs, and the classes objects.
%
%----------------------------------------------------
%Code Authors:
Expand Down
39 changes: 39 additions & 0 deletions Assignment5/randExample2.asv
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function randExample (trainingSet)

%Input:
%trainingSet that you can find using the TrainClassifiersPier function
%
%----------------------------------------------------
%Code Authors:
% Pierre Laurent
% Christopher Norman
%----------------------------------------------------
vectorSize = 10000;
HMMs = trainingSet.HMMs;
classes = trainingSet.classes;
A = [HMMs{1,:}];


for i=1:9
randVec{i} = rand(HMMs{i}, vectorSize);
end

figure('Name','Plotting rand vectors obtained from each source','NumberTitle','off')


for i = 1:9
x = 1 : size(HMMs, 2);
subplot(3,3,i)
stem(x, logprob(A, randVec{i}));
set(gca, 'XtickLabel', classes);
set(gca, 'Xtick', 1:size(HMMs, 2));
xlabel ('HMM index');
ylabel ('logprob(X, HMM)');
title (classes(i))
end




end

6 changes: 2 additions & 4 deletions Assignment5/randExample2.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function randExample (trainingSet)

%Input:
%HMMs that you can find using the TrainClassifiers function
%trainingSet that you can find using the TrainClassifiersPierre function.
%Structure containing the HMMs, and the classes objects.
%
%----------------------------------------------------
%Code Authors:
Expand Down Expand Up @@ -32,8 +33,5 @@ function randExample (trainingSet)
title (classes(i))
end




end

0 comments on commit eba8314

Please sign in to comment.