PHPolyMatInvDemo

PURPOSE ^

PHPolyMatInvDemo(SourceSwitch);

SYNOPSIS ^

function PHPolyMatInvDemo(sw);

DESCRIPTION ^

PHPolyMatInvDemo(SourceSwitch);

  PHPolyMatInvDemo(SourceSwitch) demonstrates the inversion of a 
  parahermitian matrix using the function PHPolyMatInv(). The input
  parameter SourceSwitch selects between different sample parahermitian
  matrices

  Input parameter
     SourceSwitch    0: a random complex valued 3x3x5 matrix (default) 
                     1: a simple real valued 3x3x5 matrix
                     2: a real valued 4x4x5 matrix
                     3: a simple complex valued 3x3x3 matrix

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function PHPolyMatInvDemo(sw);
0002 %PHPolyMatInvDemo(SourceSwitch);
0003 %
0004 %  PHPolyMatInvDemo(SourceSwitch) demonstrates the inversion of a
0005 %  parahermitian matrix using the function PHPolyMatInv(). The input
0006 %  parameter SourceSwitch selects between different sample parahermitian
0007 %  matrices
0008 %
0009 %  Input parameter
0010 %     SourceSwitch    0: a random complex valued 3x3x5 matrix (default)
0011 %                     1: a simple real valued 3x3x5 matrix
0012 %                     2: a real valued 4x4x5 matrix
0013 %                     3: a simple complex valued 3x3x3 matrix
0014 
0015 %  S. Weiss, 6/1/2016
0016 
0017 %-----------------------------------------------------------
0018 %  create/pick a parahermitian matrix
0019 %-----------------------------------------------------------
0020 if nargin == 0,         % default for switch selection
0021    sw=0;
0022 end;
0023 if sw == 0,             % random complex covariance matrix
0024    A = randn(3,3,3) + sqrt(-1)*randn(3,3,3);;
0025    R = MIMOConv(A,ParaHerm(A));
0026 elseif sw ==1,          % cov. matrix with 2 off-diag. terms
0027    R(:,:,1) = zeros(3,3,1);
0028    R(:,:,2) = zeros(3,3,1);
0029    R(:,:,3) = diag(ones(3,1));
0030    R(:,:,4) = zeros(3,3,1);
0031    R(:,:,5) = zeros(3,3,1);
0032    R(3,2,1) = .5;
0033    R(2,3,5) = .5;
0034    R(1,2,2) = -.4;
0035    R(2,1,4) = -.4;
0036 elseif sw == 2,
0037    R(:,:,1) = zeros(3,3,1);
0038    R(:,:,2) = zeros(3,3,1);
0039    R(:,:,3) = diag([1 1 3]);
0040    R(:,:,4) = zeros(3,3,1);
0041    R(:,:,5) = zeros(3,3,1);
0042    R(1,2,1) = .5;
0043    R(2,1,5) = .5;
0044    R(1,2,2) = -.4;
0045    R(2,1,4) = -.4;
0046 else                    % cov. matrix with single off-diag. term
0047    R(:,:,1) = zeros(3,3,1);
0048    R(:,:,2) = diag(ones(3,1));
0049    R(:,:,3) = zeros(3,3,1);
0050    R(3,1,1) = sqrt(-1)*.5;
0051    R(1,3,3) = -sqrt(-1)*.5;
0052 end;  
0053 
0054 S = PHPolyMatInv(R,201);
0055 PolyMatDisplay(abs(PolyMatConv(S,R)));

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