| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Filter Design Toolbox |
| Contents | Index |
| Learn more about Filter Design Toolbox |
c = fftcoeffs(hd)
c = fftcoeffs(ha)
c = fftcoeffs(hd) return the frequency-domain coefficients used when filtering with the dfilt.fftfir object. c contains the coefficients
c = fftcoeffs(ha) return the frequency-domain coefficients used when filtering with adaptfilt objects.
fftcoeffs applies to the following adaptive filter algorithms:
This example demonstrates returning the FFT coefficients from the discrete-time filter hd.
b = [0.05 0.9 0.05];
len = 50;
hd = dfilt.fftfir(b,len)
hd =
FilterStructure: 'Overlap-Add FIR'
Numerator: [0.0500 0.9000 0.0500]
BlockLength: 50
NonProcessedSamples: []
PersistentMemory: false
c=fftcoeffs(hd)
c =
1.0000
0.9920 + 0.1204i
0.9681 + 0.2386i
0.9289 + 0.3523i
0.8753 + 0.4594i
0.8084 + 0.5580i
0.7297 + 0.6464i
0.6408 + 0.7233i
0.5435 + 0.7874i
0.4398 + 0.8381i
0.3317 + 0.8747i
0.2211 + 0.8971i
0.1099 + 0.9054i
0 + 0.9000i
-0.1070 + 0.8815i
-0.2097 + 0.8506i
-0.3066 + 0.8084i
-0.3967 + 0.7558i
-0.4790 + 0.6939i
-0.5528 + 0.6240i
-0.6176 + 0.5472i
-0.6730 + 0.4645i
-0.7185 + 0.3771i
-0.7541 + 0.2860i
-0.7796 + 0.1921i
-0.7949 + 0.0965i
-0.8000
-0.7949 - 0.0965i
-0.7796 - 0.1921i
-0.7541 - 0.2860i
-0.7185 - 0.3771i
-0.6730 - 0.4645i
-0.6176 - 0.5472i
-0.5528 - 0.6240i
-0.4790 - 0.6939i
-0.3967 - 0.7558i
-0.3066 - 0.8084i
-0.2097 - 0.8506i
-0.1070 - 0.8815i
0 - 0.9000i
0.1099 - 0.9054i
0.2211 - 0.8971i
0.3317 - 0.8747i
0.4398 - 0.8381i
0.5435 - 0.7874i
0.6408 - 0.7233i
0.7297 - 0.6464i
0.8084 - 0.5580i
0.8753 - 0.4594i
0.9289 - 0.3523i
0.9681 - 0.2386i
0.9920 - 0.1204iSimilarly, you can use fftcoeffs with the adaptive filters algorithms listed above. Start by constructing an adaptive filter ha.
d = 16; % Number of samples of delay. b = exp(j*pi/4)*[-0.7 1]; % Numerator coefficients of channel. a = [1 -0.7]; % Denominator coefficients of channel. ntr= 1000; % Number of iterations. s = sign(randn(1,ntr+d)) +... j*sign(randn(1,ntr+d)); % Baseband QPSK signal. n = 0.1*(randn(1,ntr+d) + j*randn(1,ntr+d)); % Noise signal. r = filter(b,a,s)+n; % Received signal. x = r(1+d:ntr+d); % Input signal (received signal). d = s(1:ntr); % Desired signal (delayed QPSK signal). del = 1; % Initial FFT input powers. mu = 0.1; % Step size. lam = 0.9; % Averaging factor. d = 8; % Block size. ha = adaptfilt.pbufdaf(32,mu,1,del,lam,n);
Here are the coefficients before you filter a signal.
c=fftcoeffs(ha)
c =
Columns 1 through 13
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 14 through 16
0 0 0
0 0 0
0 0 0
0 0 0Filtering a signal y produces complex nonzero coefficients that you use fftcoeffs to see.
[y,e] = filter(ha,x,d); c=fftcoeffs(ha) c = Columns 1 through 4 0.1425 - 0.0957i 0.0487 - 0.0503i -0.0479 + 0.0315i 0.0769 - 0.0435i 0.7264 - 0.7605i -0.7423 - 0.6382i 0.1758 + 0.6679i 0.2018 - 0.6544i 0.1604 + 0.0747i -0.0709 + 0.2610i -0.1634 + 0.2929i -0.1488 + 0.3610i -0.0396 + 0.0416i 0.0985 + 0.0095i 0.0733 + 0.0011i 0.0700 + 0.0348i Columns 5 through 8 -0.0604 + 0.1767i 0.0732 - 0.0648i -0.0870 + 0.0383i 0.0298 - 0.0852i -0.1665 + 0.3741i 0.3174 - 0.5234i -0.1990 + 0.4150i 0.3657 - 0.4760i -0.2198 + 0.4273i -0.2690 + 0.3981i -0.2820 + 0.3095i -0.3633 + 0.3517i -0.0537 - 0.0855i -0.0190 + 0.0336i 0.0091 - 0.0061i -0.0299 + 0.0001i Columns 9 through 12 -0.0437 + 0.0676i 0.0499 - 0.0164i -0.0397 + 0.0165i 0.0455 - 0.0085i -0.3293 + 0.3076i 0.4986 - 0.3949i -0.3300 + 0.3448i 0.5492 - 0.2633i -0.2671 + 0.3238i -0.3813 + 0.2999i -0.4130 + 0.2333i -0.2910 + 0.2823i -0.0300 + 0.0236i -0.0103 + 0.0438i 0.0244 + 0.0476i 0.1043 + 0.0359i Columns 13 through 16 -0.0602 + 0.1189i -0.0227 - 0.1076i -0.0282 + 0.0634i 0.0170 - 0.0464i -0.4385 + 0.0549i 0.5232 - 0.1904i -0.6414 - 0.1717i 0.5580 + 0.6477i -0.4511 + 0.3217i -0.4301 + 0.1765i -0.2805 + 0.1270i -0.2531 + 0.0299i 0.1076 - 0.0383i -0.0166 + 0.0020i 0.0004 - 0.0376i 0.0071 - 0.0714i
adaptfilt.fdaf, adaptfilt.pbfdaf, adaptfilt.pbufdaf, adaptfilt.ufdaf
![]() | fdesign.rsrc | filter | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |