Home > source > extendedAffine.m

extendedAffine

PURPOSE ^

Calculate the Extended Affine Matrix of matrix A.

SYNOPSIS ^

function [ newA ] = extendedAffine( A, n, m, hState, d )

DESCRIPTION ^

Calculate the Extended Affine Matrix of matrix A.

Calculate the Extended Affine Matrix of matrix A where n is the degree of
A and m is the degree of the state vector x in homogeneous form.

Prototype: [newA] = extendedAffine(A, n, m, hState, d)

Input:     A - nxn matrix with Syms affine parameters.
           n - Degree of A.
           m - Degree of the state vector x in homogeneous form.
           hState - Homogeneous state vector.
           d - Dimension of homogeneous state vector hState.

Output:    newA - Extended Affine Matrix A divided in cells.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %Calculate the Extended Affine Matrix of matrix A.
0002 %
0003 %Calculate the Extended Affine Matrix of matrix A where n is the degree of
0004 %A and m is the degree of the state vector x in homogeneous form.
0005 %
0006 %Prototype: [newA] = extendedAffine(A, n, m, hState, d)
0007 %
0008 %Input:     A - nxn matrix with Syms affine parameters.
0009 %           n - Degree of A.
0010 %           m - Degree of the state vector x in homogeneous form.
0011 %           hState - Homogeneous state vector.
0012 %           d - Dimension of homogeneous state vector hState.
0013 %
0014 %Output:    newA - Extended Affine Matrix A divided in cells.
0015 
0016 function [ newA ] = extendedAffine( A, n, m, hState, d )
0017 
0018 [Ae] = extendedMatrix(A, n, m, hState);
0019 
0020 kmax = 0;
0021 paramName = findsym(A);
0022 if strfind(paramName,',')
0023     paramName = strsplit(',',paramName);
0024 else
0025     paramName = strsplit('',paramName);
0026 end
0027 
0028 for i = 0:length(paramName)
0029     for j = 1:length(paramName)
0030         if i ~= j
0031             eval(strcat(char(paramName(j)),'=0;'));
0032         else
0033             eval(strcat(char(paramName(j)),'=1;'));
0034         end
0035     end
0036     newA{i+1} = subs(Ae);
0037     if i~=0
0038         newA{i+1} = newA{i+1}-newA{1};
0039     end
0040 end
0041 
0042 return;
0043 
0044 end

Generated on Thu 24-Sep-2009 17:17:32 by m2html © 2005