1function [w1]=CCAF(phi,psi,order,w,snrThresh,amcInds)
2
3 if ~isempty(phi)
4
5 uBoundInds = w > phi; lBoundInds = w < psi;
6
7 if ~isempty(snrThresh)
8 amcIndMat = ones(order,1) * amcInds;
9 uBoundInds = uBoundInds & amcIndMat;
10 lBoundInds = lBoundInds & amcIndMat;
11 end
12
13 w(uBoundInds) = phi(uBoundInds);
14 w(lBoundInds) = psi(lBoundInds);
15 end
16
17
18 w1=w;
19end