If the 2-D sample space is not regular, it may cause asymmetry in probability during a random walk. This algorithm rearranges the sample space to a new array with nRow
rows and nCol
columns.
m = 2;
funcLogic = @(data1, data2) ((0 <= data1 + data2) & (data1 + data2 <= m));