How to plot magnitude and phase response of 2 cascaded filters in Matlab?
Using MATLAB/Octave as the tool, the following approach lets you plot the magnitude &amp; phase samples of the DTFT of the cascade of the two discrete-time LTI filters using their LCCDE coefficient vectors $b[k]$, and $a[k]$, assuming they have LCCDE representations..

Since the cascade LTI system is described as: 
$$h[n] = h_1[n] \star h_2[n]$$ and consequently
$$ H(z) = H_1(z) H_2(z) $$

Where the $h[n]$ is the impulse response of the cascade system and $H(z)$ is its transfer function (Z-transform of impulse response). Those $h_1[n]$ and $h_2[n]$ refer to the impulse responses of the individual systems that make up the cascade.

Assuming that individual systems do have rational Z-transforms, then we have the following expression for the composite (cascade) system Z-transfom:
$$ 
\begin{align}
H(z)  &amp;=\frac{ \sum_{k=0}^{M} B[k]z^{-k} } {\sum_{k=0}^{N} A[k]z^{-k}} = H_1(z) H_2(z) \\ \\
&amp;=
\left(  \frac{ \sum_{k=0}^{M_1} b_1[k]z^{-k} } {\sum_{k=0}^{N_1} a_1[k]z^{-k}} \right)
\left( \frac{ \sum_{k=0}^{M_2} b_2[k]z^{-k} } {\sum_{k=0}^{N_2} a_1[k]z^{-k}} \right)
\end{align}
$$

Where individual coefficients $b_1[k],a_1[k],b_2[k],a_2[k]$ are those that represent the cascaded systems.

We want $B[k]$ and $A[k]$ that represent the cascade system, from which we can use the following Matlab/Octave function to plot the DTFT magnitude and phase responses, assumimg that the cascade is a stable LTI system so that it will have a frequency response function:

figure,freqz(B,A);


Now it can be shown by polynomial manipulations that the coefficients $B[k]$ and$A[k]$ are related to the individual coefficients $b_1[k],a_1[k],b_2[k],a_2[k]$ as the following:
$$ B[k] = b_1[k] \star b_2[k]$$ and
$$ A[k] = a_1[k] \star a_2[k]$$

Hence the required frequency response plot can be obtained in the combined call as follows:

figure,freqz(conv(b1,b2),conv(a1,a2));


where b1,a1 and b2,a2 are the coefficient vectors that represent the individual systems. The method can be generalised to N systems in cascade.