PolyMatDisplay

PURPOSE ^

PolyMatDisplay(H,t);

SYNOPSIS ^

function PolyMatDisplay(H,t);

DESCRIPTION ^

PolyMatDisplay(H,t);
  
   Display the MIMO system or polynomial matrix represented by H. If H is
   of dimension K x M x L, then Matlab will produce KxM subplots, each con-
   taining an FIR response of length L.

   In general, the system H(z) represented by H will be of the form
      H(z) = H_{-L1} z^{L1} + ... + H_{-1} z + H0 + 
                + H1 z^{-1} + ... + H_{L2} z^{-L2}
   such that the total support length is L = L1+L2+1.

   PolyMatDisplay(H) will plot the FIR filters along an x-axis range [0;L-1].
   PolyMatDisplay(H,t) will plot the FIR filters against an axis t, whereby the
   length of t must equal L.
 
   The input H is assumed to be real valued. If complex valued, only the 
   absolute values of the coefficients will be plotted.

   The function produces a Matlab figure with KxM subplots each containing
   a stem plot. The axes are returned unlabelled.

   Input parameters
      H      KxMXL MIMO system matrix or polynomial matrix
      t      L-dimensional axis vector (optional)
             default:  t=(0:(L-1));

   Output parameters: none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function PolyMatDisplay(H,t);
0002 %PolyMatDisplay(H,t);
0003 %
0004 %   Display the MIMO system or polynomial matrix represented by H. If H is
0005 %   of dimension K x M x L, then Matlab will produce KxM subplots, each con-
0006 %   taining an FIR response of length L.
0007 %
0008 %   In general, the system H(z) represented by H will be of the form
0009 %      H(z) = H_{-L1} z^{L1} + ... + H_{-1} z + H0 +
0010 %                + H1 z^{-1} + ... + H_{L2} z^{-L2}
0011 %   such that the total support length is L = L1+L2+1.
0012 %
0013 %   PolyMatDisplay(H) will plot the FIR filters along an x-axis range [0;L-1].
0014 %   PolyMatDisplay(H,t) will plot the FIR filters against an axis t, whereby the
0015 %   length of t must equal L.
0016 %
0017 %   The input H is assumed to be real valued. If complex valued, only the
0018 %   absolute values of the coefficients will be plotted.
0019 %
0020 %   The function produces a Matlab figure with KxM subplots each containing
0021 %   a stem plot. The axes are returned unlabelled.
0022 %
0023 %   Input parameters
0024 %      H      KxMXL MIMO system matrix or polynomial matrix
0025 %      t      L-dimensional axis vector (optional)
0026 %             default:  t=(0:(L-1));
0027 %
0028 %   Output parameters: none
0029 
0030 %    S Weiss, Univ. of Strathclyde, 30/7/14
0031   
0032 hold off;  
0033 [K,L,M] = size(H);
0034 
0035 % check dimensions
0036 if nargin==1,
0037   t = (0:M-1);
0038 end;  
0039 if length(t)~=M,
0040    error('dimension mismatch for input parameters to function MIMODisplay()');
0041 end;
0042 
0043 % check if input matrix is real valued
0044 if isreal(H)~=1,
0045    H = abs(H);    % if not, plot absolute value of coefficients
0046 end;
0047 
0048 Hmin = min(min(min(H)));
0049 Hmax = max(max(max(H)));
0050 if Hmin>0, 
0051   Hmin=0; 
0052 end;
0053 i = 0;
0054 for k = 1:K,
0055   for l = 1:L,
0056     i = i + 1;
0057     subplot(K,L,i);
0058     stem(t,shiftdim(H(k,l,:),1));
0059     axis([t(1)-.1 t(end)+.1 Hmin*1.1 Hmax*1.1]);
0060   end;
0061 end;

Generated on Mon 03-Jul-2023 19:45:57 by m2html © 2005