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

fir1 (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 = fir1(n, w)

b = fir1(n, w, option)

b = fir1(n, [w1, w2], window)

b = fir1(n, [w1, w2], option, window)

Description

Uses the window design method to design a linear phase FIR filter. This function windows the impulse response with a Hamming window by default.

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.
w Specifies the cutoff frequency of the filter. w is real number between 0 and 1. 1 represents the Nyquist frequency.
w1 Specifies the low cutoff frequency. w1 must fall in the range [0, 1].
w2 Specifies the high cutoff frequency. w2 must fall in the range [0, 1] and must be greater than w1.
option Specifies the type of filter to design. option is a string that accepts the following values.

'bandpass' Designs a bandpass filter.
'low' (default) Designs a lowpass filter.
'high' Designs a highpass filter.
'noscale' Directs LabVIEW not to scale the filter coefficients.
'scale' Directs LabVIEW to scale the filter coefficients.
'stop' Designs a stopband filter.
window Specifies the window coefficients. The length of window must equal n + 1. If n is even and the filter has a non-zero gain at the Nyquist frequency, the length of window must equal n + 2.

Outputs

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

Examples

N = 5;
W = 0.2;
B = fir1(N, W, 'low', hanning(6))

Related Topics

filter
fir2
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