Documentation Center

  • Trial Software
  • Product Updates

dfilt.scalar

Discrete-time, scalar filter

Syntax

Hd = dfilt.scalar(g)
Hd = dfilt.scalar

Description

Hd = dfilt.scalar(g) returns a discrete-time, scalar filter, Hd, with gain g, where g is a scalar.

Hd = dfilt.scalar returns a default, discrete-time scalar gain filter, Hd, with gain 1.

Examples

Create a direct-form I filter and a scalar object with a gain of 3 and cascade them together.

b = [0.3 0.6 0.3];
a = [1 0 0.2];
Hd_filt = dfilt.df1(b,a);
Hd_gain = dfilt.scalar(3);
Hd_cascade = cascade(Hd_gain,Hd_filt);
hfvt = fvtool(Hd_filt,Hd_gain,Hd_cascade);
legend(hfvt,'Original Filter','Gain','Cascaded Filter',...
'location','southwest');

To view the stages of the cascaded filter, use

Hd.stage(1)

and

Hd.stage(2)

See Also

|

Was this topic helpful?