I create a filter using the FDATOOL or through command line functionality and would like the coefficients returned as fixed-point objects.
John Williams answered .
2025-11-20
d=fdesign.lowpass(0.40,0.54,0.05,50);
hd=design(d,'kaiserwin','filterstructure','dffir');
hd.Arithmetic='fixed';
set(hd,'filterInternals','specifyprecision');
hd.productWordLength = 16;
hd.accumwordLength = 40;
myfi = fimath('maxproductwordlength',16,'maxsumwordlength',40);
numerator = fi(hd.numerator,hd.signed,hd.inputwordlength,...
hd.inputfracLength, 'fimath', myfi)