IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
vectorcomp_ttest.m
Go to the documentation of this file.
1 %> Vector Comparer - t-test
2 %
3 %>
4 %> A positive value means that the first vector is "better" than the second. A negative value means the opposite.
6  properties
7  %> Whether to make result as -log10(p_value)
8  flag_logtake = 1;
9  end;
10  methods(Access=protected)
11  function z = do_test(o, v1, v2)
12  [dummy, z] = ttest(v1, v2);
13  if o.flag_logtake
14  z = -log10(z);
15  end;
16  z = [z, -z];
17  if mean(v1) < mean(v2)
18  z = -z;
19  end;
20  end;
21  end;
22 
23  methods
24  function o = vectorcomp_ttest(o)
25  o.classtitle = 'T-Test';
26  o.flag_params = 0;
27  end;
28  end;
29 end
Vector Comparer - t-test.
Paired Vector Comparer base class.
Definition: vectorcomp.m:9
Analysis Session (AS) base class.
Definition: as.m:6