Engee documentation

designHighpassFIR

Formation of a high-pass FIR filter.

Library

EngeeDSP

Syntax

Function call

  • B = designHighpassFIR() — generates a high-pass FIR filter with the filter order 100, the cutoff frequency 0.25 and the Hamming window. Argument B is a vector of filter coefficients of length 101.

    Argument SystemObject the default value is false. To implement the filter, assign the filter coefficients from the vector B the object FIRFilter.

  • B = designHighpassFIR(Name=Value) — sets parameters using one or more name-value arguments.

    For example, B = designHighpassFIR(FilterOrder=30, CutoffFrequency=0.5, Window="hann", SystemObject=true) designs a high-pass FIR filter with filter order 30, the cutoff frequency 0.5 and Hannah’s window. Since the argument SystemObject it matters true, the function forms a high-pass FIR filter. In this case B — this is a system object FIRFilter.

    If you specify only a partial list of filter parameters, the function designs the filter, setting the default values for the remaining parameters.

    When specifying any of the numeric input arguments with single precision, the function calculates the filter coefficients with single precision. Alternatively, you can use arguments Datatype and like to control the data type of coefficients.

Arguments

Name-value input arguments

Specify optional argument pairs as Name=Value, where Name — the name of the argument, and Value — the appropriate value. The order of the name-value arguments does not matter.

# FilterOrder — the order of the FIR high-pass filter

+ 100 (by default) | an even non-negative integer

Details

Order FIR is a high-pass filter, specified as an even non-negative integer.

Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# Cutoffrequency — the cutoff frequency of the high-pass FIR filter

+ 0.25 (by default) | normalized scalar

Details

High-pass FIR filter cutoff frequency, , defined as a normalized scalar in the range (0, 1].

Типы данных

Float32, Float64

# Window — window design method

+ "hamming" (default) | "hann" | "blackman" | "blackman-harris" | "chebyshev" | "kaiser" | "custom"

Details

The window design method specified by one of the following values:

  • "hamming";

  • "hann";

  • "blackman";

  • "blackman-harris";

  • "chebyshev" — by default, the attenuation of the side lobes is 60 dB;

  • "kaiser";

  • "custom" — specify the vector of the user window in the argument CustomWindow.

Типы данных

Char, String

# CustomWindow — vector of the user window

+ vector

Details

The vector of the user window, set as a vector of length FilterOrder + 1.

Типы данных

Float32, Float64

# Datatype — the data type of the filter coefficients by type name

+ Float64 (by default) | Float32

Details

The data type of the filter coefficients by type name, specified as Float64 or Float32.

To specify the data type of the filter coefficients, you can use the argument Datatype or like, but you can’t use both arguments at the same time.

If you specify the data type of the filter coefficients using this argument, the function ignores the data types of the other numeric arguments.

Типы данных

DataType

# like is the data type of the filter coefficients based on the prototype

+ a real floating-point number

Details

The data type of the filter coefficients, specified as a prototype of a floating-point real number.

To specify the data type of the filter coefficients, you can use the argument Datatype or like, but you can’t use both arguments at the same time.

If you specify the data type of the filter coefficients using this argument, the function ignores the data types of the other numeric arguments.

Типы данных

Float32, Float64

# SystemObject — flag for creating a system object

+ false (by default) | true

Details

The flag for creating a system object, set as

  • false — the function returns a vector of FIR filter coefficients;

  • true — the function returns an object FIRFilter.

Типы данных

Bool

# Verbose — the flag for printing a function call in Engee
false (by default) | true

Details

The flag for printing a function call in Engee, set as

  • false — the function does not output a function call;

  • true — the function outputs the entire function call, including the default values for type arguments Name=Value which were not specified when calling the function.

    Use this value to view all the parameters used by the function to design and implement the filter.

Типы данных

Bool

Output arguments

# B — filter coefficients or filter object

+ vector string | FIRFilter object

Details

Coefficients of a high-pass FIR filter or a filter object returned as:

  • String vectors — the function returns a string vector of length FilterOrder + 1 if for the argument SystemObject the value is set false.

    If values with single precision are specified in any of the input arguments, the function calculates the filter coefficients with single precision.

    If the data type is specified using an argument Datatype or like, the function ignores the data types of other numeric arguments.

  • The system object FIRFilter — the function returns a filter object if for the argument SystemObject the value is set true.

Типы данных

Float32, Float64