Mercurial > hg > map
comparison MAP/MAP1_14.m @ 21:c489ebada16e
pre Oldenburg changes
author | Ray Meddis <rmeddis@essex.ac.uk> |
---|---|
date | Mon, 13 Jun 2011 18:13:29 +0100 |
parents | 35af36fe0a35 |
children | 45f28c49461e |
comparison
equal
deleted
inserted
replaced
16:37a379b27cff | 21:c489ebada16e |
---|---|
621 % broken stick instantaneous compression | 621 % broken stick instantaneous compression |
622 % nonlinear gain is weakend by MOC before applied to BM response | 622 % nonlinear gain is weakend by MOC before applied to BM response |
623 y= nonlinOutput.*(MOC* DRNLa); % linear section. | 623 y= nonlinOutput.*(MOC* DRNLa); % linear section. |
624 % compress those parts of the signal above the compression | 624 % compress those parts of the signal above the compression |
625 % threshold | 625 % threshold |
626 abs_x = abs(nonlinOutput); | 626 abs_x = abs(y); |
627 idx=find(abs_x>DRNLcompressionThreshold); | 627 idx=find(abs_x>DRNLcompressionThreshold); |
628 if ~isempty(idx)>0 | 628 if ~isempty(idx)>0 |
629 y(idx)=sign(nonlinOutput(idx)).*... | 629 y(idx)=sign(y(idx)).*... |
630 (DRNLb*abs_x(idx).^DRNLc); | 630 (DRNLb*abs_x(idx).^DRNLc); |
631 end | 631 end |
632 nonlinOutput=y; | 632 nonlinOutput=y; |
633 | 633 |
634 % second filter removes distortion products | 634 % second filter removes distortion products |