backwardDifferenceKernels

PURPOSE ^

Creates the backward difference kernels

SYNOPSIS ^

function [Kbx, Kby] = backwardDifferenceKernels(hx, hy)

DESCRIPTION ^

 Creates the backward difference kernels
 
 Input:
   hx: grid step size in X (defaults to 1 if not set)
   hy: grid step size in Y (defaults to hx if not set)
 
 Output:
   Kbx, Kby: backward difference kernels in x/y

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Kbx, Kby] = backwardDifferenceKernels(hx, hy)
0002 % Creates the backward difference kernels
0003 %
0004 % Input:
0005 %   hx: grid step size in X (defaults to 1 if not set)
0006 %   hy: grid step size in Y (defaults to hx if not set)
0007 %
0008 % Output:
0009 %   Kbx, Kby: backward difference kernels in x/y
0010 %
0011 
0012 Kbx = zeros(3, 3);
0013 Kbx(2, 2) = 1;
0014 Kbx(2, 1) = -1;
0015 Kbx = Kbx/hx;
0016 
0017 Kby = zeros(3, 3);
0018 Kby(2, 2) = 1;
0019 Kby(1, 2) = -1;
0020 Kby = Kby/hy;
0021 
0022 end

Generated on Thu 10-Dec-2020 17:34:27 by m2html © 2005