Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

fir2 (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the filter design class.

Syntax

b = fir2(n, f, a)

b = fir2(n, f, a, w)

Description

Uses frequency sampling to design a linear phase FIR filter. fir2 windows the impulse response with a Hamming window.

Examples

Inputs

Name Description
n Specifies the filter order. n is a nonnegative integer. n must be even for filters with a non-zero gain at the Nyquist frequency. If n does not meet this condition, LabVIEW increases n by 1.
f Specifies the frequencies at which you want to take samples. 1 represents the Nyquist frequency. f is a real vector of ascending values in the interval [0, 1]. length(f) must equal length(a).
a Specifies the magnitudes at each of the f frequencies. a is a real vector. length(a) must equal length(f).
w Specifies the symmetric window to apply to the impulse response. w is a real vector of length n + 1.

Outputs

Name Description
b Returns the filter coefficients of order n. b is a real vector.

Examples

N = 13;
F = [0, 0.1, 0.5, 0.7, 1];
A = [0, 1, 1, 0, 0];
B = fir2(N, F, A)

Related Topics

filter
fir1
firgauss
firls
hamming


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit