0001 function I = GI13(M, m, n, o, type)
0002
0003
0004
0005
0006
0007 if strcmp(type, 'Gn')
0008 I = speye(n*o);
0009 I1 = speye(m+1, m);
0010 I1(end, end) = 1;
0011 I = kron(I, I1);
0012 I = [I sparse(size(I, 1), m*o)];
0013 I = I*M;
0014 elseif strcmp(type, 'Ge')
0015 I = speye(n+1, n);
0016 I(end, end) = 1;
0017 I1 = speye(m, m+1);
0018 I = kron(I, I1);
0019 I = kron(speye(o), I);
0020 I = I*M;
0021 elseif strcmp(type, 'Gc')
0022 I = speye(n*o);
0023 I1 = speye(m+1, m);
0024 I1(end, end) = 1;
0025 I = kron(I, I1);
0026 I = [I sparse(size(I, 1), m*n)];
0027 I = I*M;
0028 elseif strcmp(type, 'Gcy')
0029 I = speye(m*o);
0030 I1 = speye(n+1, n);
0031 I1(end, end) = 1;
0032 I = kron(I, I1);
0033 I = [I sparse(size(I, 1), m*n)];
0034 I = I*M;
0035 elseif strcmp(type, 'Gee')
0036 I = speye(o+1, o);
0037 I(end, end) = 1;
0038 I1 = speye(m, m+1);
0039 I = kron(I, I1);
0040 I = kron(speye(n), I);
0041 I = I*M;
0042 elseif strcmp(type, 'Gnn')
0043 I = speye(m*n);
0044 I1 = speye(o+1, o);
0045 I1(end, end) = 1;
0046 I = kron(I, I1);
0047 I = [I sparse(size(I, 1), m*o)];
0048 I = I*M;
0049 end
0050 end