Home > NoiseTools > nt_repeatability.m

nt_repeatability

PURPOSE ^

[score]=nt_repeatability(x,demean_flag) - repeatability score

SYNOPSIS ^

function score=nt_repeatability(x,demean_flag)

DESCRIPTION ^

 [score]=nt_repeatability(x,demean_flag) - repeatability score

  score: ratio of power of mean to total power

  x: data (time * channels * repeats)
  demean_flag: 0: no demean, 1: demean, 2: remove mean
  of e

  If no out argument is given, plot result.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function score=nt_repeatability(x,demean_flag)
0002 % [score]=nt_repeatability(x,demean_flag) - repeatability score
0003 %
0004 %  score: ratio of power of mean to total power
0005 %
0006 %  x: data (time * channels * repeats)
0007 %  demean_flag: 0: no demean, 1: demean, 2: remove mean
0008 %  of e
0009 %
0010 %  If no out argument is given, plot result.
0011 
0012 if nargin<1; error('!'); end
0013 if ndims(x)~=3; error('data must be 3D'); end
0014 
0015 if nargin<2 || isempty(demean_flag)
0016     demean_flag=1;
0017 end
0018 
0019 if demean_flag==1
0020     x=nt_demean(x);
0021 elseif demean_flag==2
0022     x=nt_demean2(x);
0023 end
0024 
0025 score=mean(mean(x,3).^2)./mean(nt_unfold(x.^2));
0026 
0027 if nargout == 0 ;
0028     plot(score); xlabel('component'); ylabel('score'); title('repeatability');
0029     score=[];
0030 end
0031

Generated on Tue 09-May-2017 13:19:57 by m2html © 2005