Home > NoiseTools > nt_hi_amp.m

# nt_hi_amp

## PURPOSE

y=nt_hi_amp(x) - decompose into high-amplitude components

## SYNOPSIS

function y=nt_hi_amp(x,exponent)

## DESCRIPTION

    y=nt_hi_amp(x) - decompose into high-amplitude components

## CROSS-REFERENCE INFORMATION

This function calls:

- nt_bias_hi_amp [c0,c1]=bias_hi_amp(x,exponent) - covariance with and without hi-amp bias
- nt_dss0 [todss,pwr1,pwr2]=nt_dss0(c0,c1,keep1,keep2) - dss from covariance
- nt_fold y=fold(x,epochsize) - fold 2D to 3D
- nt_hi_amp y=nt_hi_amp(x) - decompose into high-amplitude components
- nt_mmat y=nt_mmat(x,m) - matrix multiplication (with convolution)
- nt_normcol [y,norm]=nt_normcol(x,w) - normalize each column so its weighted msq is 1
- nt_unfold y=nt_fold(x) - unfold 3D to 2D

This function is called by:

- nt_hi_amp y=nt_hi_amp(x) - decompose into high-amplitude components

## SOURCE CODE

    0001 function y=nt_hi_amp(x,exponent)
    0002 %y=nt_hi_amp(x) - decompose into high-amplitude components
    0003
    0004
    0005 if nargin<1; error('!'); end
    0006 if nargin<2 || isempty(exponent); exponent=0.5; end
    0007
    0008 if ndims(x)==3;
    0009     y=nt_fold(nt_hi_amp(nt_unfold(x)),size(x,1));
    0010     return
    0011 end
    0012
    0013 y=zeros(size(x));
    0014 for k=1:size(x,2)-1
    0015     x=nt_normcol(x);
    0016     [c0,c1]=nt_bias_hi_amp(x,exponent);
    0017     [todss,pwr0,pwr1]=nt_dss0(c0,c1);
    0018
    0019     figure(100); clf;
    0020     plot(pwr1./pwr0,'.-');
    0021     ylim([0 inf]);
    0022     xlabel('component'); ylabel('score'); title ('DSS for high samplitude');
    0023
    0024     x=nt_mmat(x,todss);
    0025     y(:,k)=x(:,1);
    0026     x=x(:,2:end);
    0027     if size(x,2)==0;
    0028         break;
    0029     end
    0030 end
    0031
    0032 y=y(:,1:k+1);