PolyMatNorm

PURPOSE ^

N = PolyMatNorm(H,spec);

SYNOPSIS ^

function Fnorm = PolyMatNorm(H,SpecString);

DESCRIPTION ^

N = PolyMatNorm(H,spec);

  PolyMatNorm(H) returns the generalised square Frobenius norm of all matrix 
  elements in the polynomial matrix H(z) represented by H. This norm represents 
  the the sum over all modulus-squared matrix elements, both spatially and 
  temporally.
 
  PolyMatNorm(H,'OnDiag') only returns the sum over of all modulus-squared 
  diagonal elements. 
  
  PolyMatNorm(H,'OffDiag') only returns the sum over all off-diagonal modulus
  squared elements of H(z).

  PolyMatNorm(H,'Full') is the default and considers all matrix elements.
 
  Input parameters:
     H         MIMO system or polynomial matrix
     spec      optional parameter:
               'OnDiag' count on-diagonal elements only
               'OffDiag' count off-diagonal elements only
               'Full' count all elements
               default: 'Full'
  
 Output parameters:
     N         norm

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Fnorm = PolyMatNorm(H,SpecString);
0002 %N = PolyMatNorm(H,spec);
0003 %
0004 %  PolyMatNorm(H) returns the generalised square Frobenius norm of all matrix
0005 %  elements in the polynomial matrix H(z) represented by H. This norm represents
0006 %  the the sum over all modulus-squared matrix elements, both spatially and
0007 %  temporally.
0008 %
0009 %  PolyMatNorm(H,'OnDiag') only returns the sum over of all modulus-squared
0010 %  diagonal elements.
0011 %
0012 %  PolyMatNorm(H,'OffDiag') only returns the sum over all off-diagonal modulus
0013 %  squared elements of H(z).
0014 %
0015 %  PolyMatNorm(H,'Full') is the default and considers all matrix elements.
0016 %
0017 %  Input parameters:
0018 %     H         MIMO system or polynomial matrix
0019 %     spec      optional parameter:
0020 %               'OnDiag' count on-diagonal elements only
0021 %               'OffDiag' count off-diagonal elements only
0022 %               'Full' count all elements
0023 %               default: 'Full'
0024 %
0025 % Output parameters:
0026 %     N         norm
0027   
0028 %  S. Weiss, UoS, 5/10/2005
0029   
0030 if nargin==1,
0031    SpecString='Full';
0032 end;
0033 [M,N,L] = size(H);
0034 
0035 Fnorm = 0;
0036 if strcmp(SpecString,'Full')==1,
0037    for l = 1:L,
0038       A = H(:,:,l);
0039       Fnorm = Fnorm + sum(sum(A.*conj(A)));
0040    end;
0041 else
0042    MNmin = min(M,N);
0043    Mask = zeros(M,N);
0044    Mask(1:MNmin,1:MNmin) = eye(MNmin);
0045    if strcmp(SpecString,'OnDiag')==1,
0046       Mask = zeros(M,N);
0047       Mask(1:MNmin,1:MNmin) = eye(MNmin);
0048    elseif  strcmp(SpecString,'OffDiag')==1,        
0049       Mask = ones(M,N);
0050       Mask(1:MNmin,1:MNmin) = Mask(1:MNmin,1:MNmin) - eye(MNmin);
0051    else
0052       error('norm option in PolyMatNorm() not defined');
0053    end;
0054    for l = 1:L,
0055       A = H(:,:,l).*Mask;
0056       Fnorm = Fnorm + sum(sum(A.*conj(A)));
0057    end;
0058 end;

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