Returns a two-dimensional interpolator of 2nd-order m : Number of cells along x-axis n : Number of cells along y-axis c1 : Left interpolation coeff. c2 : Bottom interpolation coeff. ---------------------------------------------------------------------------- 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. ----------------------------------------------------------------------------
0001 function I = interpolD2D(m, n, c1, c2) 0002 % Returns a two-dimensional interpolator of 2nd-order 0003 % m : Number of cells along x-axis 0004 % n : Number of cells along y-axis 0005 % c1 : Left interpolation coeff. 0006 % c2 : Bottom interpolation coeff. 0007 % ---------------------------------------------------------------------------- 0008 % SPDX-License-Identifier: GPL-3.0-or-later 0009 % © 2008-2024 San Diego State University Research Foundation (SDSURF). 0010 % See LICENSE file or https://www.gnu.org/licenses/gpl-3.0.html for details. 0011 % ---------------------------------------------------------------------------- 0012 0013 Ix = interpolD(m, c1); 0014 Iy = interpolD(n, c2); 0015 0016 Im = sparse(m + 2, m); 0017 In = sparse(n + 2, n); 0018 0019 Im(2:(m+2)-1, :) = speye(m, m); 0020 In(2:(n+2)-1, :) = speye(n, n); 0021 0022 Sx = kron(In, Ix); 0023 Sy = kron(Iy, Im); 0024 0025 I = [Sx Sy]; 0026 end