How can I generate a plot of the the transfer function of my filter?
Two functions provided in the Signal Processing Toolbox allow this to be done quite easily. These functions are freqz (for digital filters) and freqs (for analog filters). Calling these functions without any output arguments will automatically generate a magnitude and phase plot in the current figure window. For example, assume that b and a contain the numerator and denominator coefficients for a given filter.