Home > src > matlab > GI13.m

GI13

PURPOSE ^

----------------------------------------------------------------------------

SYNOPSIS ^

function I = GI13(M, m, n, o, type)

DESCRIPTION ^

 ----------------------------------------------------------------------------
 SPDX-License-Identifier: GPL-3.0-or-later
 © 2008-2024 San Diego State University Research Foundation (SDSURF).
 See LICENSE file or https://www.gnu.org/licenses/gpl-3.0.html for details.
 ----------------------------------------------------------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function I = GI13(M, m, n, o, type)
0002 % ----------------------------------------------------------------------------
0003 % SPDX-License-Identifier: GPL-3.0-or-later
0004 % © 2008-2024 San Diego State University Research Foundation (SDSURF).
0005 % See LICENSE file or https://www.gnu.org/licenses/gpl-3.0.html for details.
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

Generated on Tue 18-Mar-2025 18:53:27 by m2html © 2003-2022