# What do high and low order have a meaning in FIR filter?

I'm new DSP fields, and slowly study of FIR Filer and with Matlab which is fir1 function.

My question is that

1. What do high and low order have a meaning in fir1 filter? I can't understand what does it have a meaning when N=2 or N=48.

2. In cut-off frequency, I found some explanation from the MATLAB as the below,

fir1 FIR filter design using the window method. B = fir1(N,Wn) designs an N'th order lowpass FIR digital filter and returns the filter coefficients in length N+1 vector B. The cut-off frequency Wn must be between 0 < Wn < 1.0, with 1.0 corresponding to half the sample rate. The filter B is real and has linear phase. The normalized gain of the filter at Wn is -6 dB.

B = fir1(N,Wn,'high') designs an N'th order highpass filter.
You can also use B = fir1(N,Wn,'low') to design a lowpass filter.

If Wn is a two-element vector, Wn = [W1 W2], fir1 returns an
order N bandpass filter with passband  W1 < W < W2. You can
also specify B = fir1(N,Wn,'bandpass').  If Wn = [W1 W2],
B = fir1(N,Wn,'stop') will design a bandstop filter.


But I want to know should we have to know the sample rate to set cut-off frequency? usually in practically, How does it handle to set the cut-off frequency?

1. I've seen from the book, in the Liner system, if we put the impulse to the Liner system then we can totally analyze the system. In practically, how to implement the impulse signal to the liner system to get the filter information?

1- an FIR filter can be described by the following input/output relation: $$y[n] = \sum_{k=0}^{N} b[k]x[n-k]$$
where $N$ is the order of the FIR filter (its length-1) and those coefficients $b[k]$ of length $N+1$ are the FIR filters impulse response, or the filter coefficients in practice.
As one can see high order FIR filter means $N$ to be large and low order means $N$ to be small. Note that most of those coefficients can be set $0$ but the last one at $x[n-N]$ would still make a high order filter (specifically a filter with a pure delay).
The delay associated with FIR filters (of syymetric impulse respomnse types) is directly related to the order $N$ of the filter.
2- An FIR low-pass filter is a mathematical algorithm and its cutoff frequency is normalised to be between $0$ and $\pi$ radians mathematically and between $0$ and $1$ for software such as MATLAB. When you want to find the physical cutoff frequency of such an FIR filter , you should consider the phytsical sampling rate and relate it through $$f_c = \frac{\omega_c F_s}{ 2\pi}$$ where $\omega_c$ is the cutoff frequency (in radians per sample) of the mathematical filter, and $f_c$ is the physical cutoff frequency in Hertz.
3- Impulse response of the FIR filter is directly available in the coefficients $b[k]$ as I've explained. When you are dealing with an IIR filter or an LTI filter which does not posses a LCCDE expression, then practical computation of the impulse response that can be done in a number of ways. The simplest could be to create a signal that defines the unit impulse as delta = [1, zeros(1,L-1)] then the $L$ points of the impulse response can be computed directly by h = filter(b,a,delta) . Note that if impulse response $h[n]$ does not decay fast enough then you should increase the length $L$.