How can I obtain the quantized filter coefficients as fixed-point objects in Filter Design Toolbox 4.0 (R2006b)?
5 次查看(过去 30 天)
显示 更早的评论
I create a filter using the FDATOOL or through command line functionality and would like the coefficients returned as fixed-point objects.
采纳的回答
MathWorks Support Team
2009-6-27
The ability to obtain the quantized filter coefficients as fixed-point objects is not available in the Filter Design Toolbox 4.0 (R2006b).
To work around this you can manually convert the coefficients to fixed-point objects as shown below:
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)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Floating-Point to Fixed-Point Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!