| Filter Design Toolbox™ | ![]() |
autoscale(hd,x)
hnew = autoscale(hd,x)
autoscale(hd,x) provides dynamic range scaling for each node of the filter hd. This method runs signal x through hd in floating-point to simulate filtering. autoscale uses the maximum and minimum data obtained from that simulation at each filter node to set fraction lengths to cover the simulation full range and maximize the precision. Word lengths are not changed during autoscaling.
hnew = autoscale(hd,x) If you request an output, autoscale returns a new filter with the scaled fraction lengths. The original filter is not changed.
For introductory demonstrations of the automatic scale process, refer to the following demos in the toolbox:
To demonstrate the autoscaling capability using a set of input data, this example uses a bandpass IIR lattice filter with random input data. To run this example in MATLAB, you must enable logging for fi objects—
fipref('LoggingMode','on')After you have enabled logging, this example uses a lattice ARMA filter to demonstrate automatic scaling with autoscale..
hd = design(fdesign.bandpass,'ellip');
hd = convert(hd,'latticearma');
hd.arithmetic = 'fixed';
rand('state', 4)
x = rand(100,10); % Training input data.
hd(2) = autoscale(hd,x);
hfvt = fvtool(hd,'Analysis','magestimate',...
'Showreference','off');
legend(hfvt,'Before Autoscaling', 'After Autoscaling')After you run autoscale, the resulting plot uses FVTool with before and after curves.

![]() | allpassshiftc | block | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |