function v = AI_all_ex_same(examples)
%
% AI_all_ex_same - determine if all examples same value
% Call:
%     v = A_all_ex_same([1 1 0 1]);
% On input:
%     examples (mxn array): training examples
% On output:
%     v (scalar): 0 if not all same; else 1
% Custom functions used:
%     none
% Author:
%     T. Henderson, UU, 11/2002
% Method:
%

[num_examples,num_cols] = size(examples);
v = 0;
indexes = find(examples(:,num_cols-1)==1);
vals = examples(indexes,num_cols);
ind_same = find(vals==vals(1));
if length(vals)==length(ind_same)
    v = 1;
end
